https://github.com/tinne26/sfntshape
Wanna make cool shapes?
https://github.com/tinne26/sfntshape
ebitengine golang vector-graphics
Last synced: 7 months ago
JSON representation
Wanna make cool shapes?
- Host: GitHub
- URL: https://github.com/tinne26/sfntshape
- Owner: tinne26
- License: mit
- Created: 2023-07-28T21:08:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-08T21:44:59.000Z (over 2 years ago)
- Last Synced: 2025-04-02T19:16:42.461Z (about 1 year ago)
- Topics: ebitengine, golang, vector-graphics
- Language: Go
- Homepage: https://tinne26.github.io/sfntshape/
- Size: 3.22 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## sfntshape
[](https://pkg.go.dev/github.com/tinne26/sfntshape)
A simple `Shape` type to render vectorial shapes through [golang.org/x/image/vector#Rasterizer](https://pkg.go.dev/golang.org/x/image/vector#Rasterizer).
The `Shape` type offers two APIs:
- sfnt/Ebitengine style: `MoveTo`, `LineTo`, `QuadTo`, `CubeTo`.
- Relative style: `Turn`, `TurnTo`, `Move`, `Line`.
This code was originally part of [etxt](https://github.com/tinne26/etxt), but it was split after v0.0.9. The code now doesn't depend on [etxt](https://github.com/tinne26/etxt) nor [Ebitengine](https://ebitengine.org).
Check out a cool [online example](https://tinne26.github.io/sfntshape), or run it yourself with:
```
go run github.com/tinne26/sfntshape/examples/rng@latest
```
*(Instructions can be hidden with H and fullscreen can be switched with F)*