Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wrnrlr/polyline
https://github.com/wrnrlr/polyline
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wrnrlr/polyline
- Owner: wrnrlr
- License: mit
- Created: 2020-09-18T08:29:13.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-18T09:50:36.000Z (about 4 years ago)
- Last Synced: 2024-05-22T12:31:49.462Z (6 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gio - Polyline
README
# Polyline
A module for [Gio](https://gioui.org) 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.