polyline

package module
v0.0.0-...-de80fc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 7 Imported by: 0

README

Polyline

A module for Gio to draw polylines.

It's currently a very naive implementation that draws every line segment and joins them with a circle. This solution is not suitable for transparent colors because overlapping parts are painted repeatedly resulting in an uneven coloring.

Hopefully we can fix this in the future and keep using the same api.

API

line := []f32.Point{{20, 20}, {20, 70}, {80, 80}, {110, 100}, {300, 500}}
polyline.Draw(line, width, color, gtx)

See example on how to use this to make a paint app.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Draw

func Draw(points []f32.Point, width float32, col color.RGBA, gtx layout.Context)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL