-
-
Notifications
You must be signed in to change notification settings - Fork 103
Renderers
Taco de Wolff edited this page Mar 26, 2023
·
9 revisions
Each renderer must implement the following interface:
Size() (float64, float64)
RenderPath(path *Path, style Style, m Matrix)
RenderText(text *Text, m Matrix)
RenderImage(img image.Image, m Matrix)
Currently the following renderers are implemented:
- Rasterizer (PNG, JPG, GIF, TIFF, ...)
- PDF (portable document format)
- SVG (scalable vector graphics)
- EPS (encapsulated PostScript)
- TeX/PGF
- HTMLCanvas (WASM)
- OpenGL
- Gio (http://gioui.org/)
- Fyne (https://fyne.io/)
Native Feature | Raster | SVG | EPS | WASM | OpenGL | Gio | |
---|---|---|---|---|---|---|---|
Fill path | yes | yes | yes | yes | yes | yes | |
Stroke path | yes | yes | yes | no | yes | ||
Dashed path | yes | yes | yes | no | yes | ||
Paint gradient | yes | yes | ~yes | no | no | ||
Embed fonts | yes | yes | no | no | |||
Draw text | yes | yes | no | no | |||
Draw image | yes | yes | yes | no | yes | yes | yes |
EvenOdd fill rule | no | yes | yes | no | no | no | no |
- EPS does not support transparency
- PDF and EPS do not support line joins for last and first dash for closed dashed path
- OpenGL is really just a rasterizer to an OpenGL texture