Skip to content

Commit

Permalink
Merge pull request #262 from kenshaw/add-kenshaw-fv-link
Browse files Browse the repository at this point in the history
Adding link to github.com/kenshaw/fv in users section of README.md
  • Loading branch information
tdewolff authored Nov 20, 2023
2 parents 6de43c7 + 49e3469 commit 3711dfc
Showing 1 changed file with 45 additions and 38 deletions.
83 changes: 45 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ Canvas is a common vector drawing target that can output SVG, PDF, EPS, raster i
Please see https://www.patreon.com/tdewolff for ways to contribute, otherwise please contact me directly!

## Recent changes

- `Context` view and coordinate view have been altered. `View` now doesn't affect the coordinate view/system. To achieve the same as before, replace `ctx.SetView(m)` by `ctx.SetView(m); ctx.SetCoordView(m)`. The change makes coordinate systems more intuitive when using in combination with views, the given coordinate reflects the coordinate where it is drawn irrespective of the view.
- `Flatten()`, `Stroke()`, and `Offset()` now require an additional `tolerance` variable, which used to be set by the `Tolerance` parameter with a default value of `0.01`. To get the original behaviour, use `Flatten(0.01)`, `Stroke(width, capper, joiner, 0.01)`, and `Offset(width, fillRule, 0.01)`.
- `Interior()` is renamed to `Fills()`
- `ParseSVG` and `MustParseSVG` are now `ParseSVGPath` and `MustParseSVGPath` to avoid confusion that it parses entire SVGs

## Features

- Path segment types: MoveTo, LineTo, QuadTo, CubeTo, ArcTo, Close
- Precise path flattening, stroking, and dashing for all segment type uing papers (see below)
- Smooth spline generation through points for open and closed paths
- Path boolean operations: AND, OR, XOR, NOT, Divide
- LaTeX to path conversion (native Go and CGO implementations available)
- Font formats support
- Font formats support
- - SFNT (such as TTF, OTF, WOFF, WOFF2, EOT) supporting TrueType, CFF, and CFF2 tables
- HarfBuzz for text shaping (native Go and CGO implementations available)
- FriBidi for text bidirectionality (native Go and CGO implementations available)
Expand All @@ -52,6 +54,7 @@ Please see https://www.patreon.com/tdewolff for ways to contribute, otherwise pl
- - [gonum/plot](https://github.com/gonum/plot)

## Examples

**[Amsterdam city centre](https://github.com/tdewolff/canvas/tree/master/examples/amsterdam-centre)**: the centre of Amsterdam is drawn from data loaded from the Open Street Map API.

**[Mauna-Loa CO2 concentration](https://github.com/tdewolff/canvas/tree/master/examples/co2-mauna-loa)**: using data from the Mauna-Loa observatory, carbon dioxide concentrations over time are drawn
Expand All @@ -73,55 +76,59 @@ Please see https://www.patreon.com/tdewolff for ways to contribute, otherwise pl
**[HTMLCanvas](https://github.com/tdewolff/canvas/tree/master/examples/html-canvas)**: an example using the HTMLCanvas backend, see the [live demo](https://tdewolff.github.io/canvas/examples/html-canvas/index.html).

## Users

This is a non-exhaustive list of library users I've come across. PRs are welcome to extend the list!

* https://github.com/aldernero/gaul (generative art utility library)
* https://github.com/aldernero/sketchy (generative art framework)
* https://github.com/carbocation/genomisc (genomics tools)
* https://github.com/davidhampgonsalves/life-dashboard (show text and emoticons in Kindle)
* https://github.com/davidhampgonsalves/quickdraw (grid of Google Quick Draw Drawings)
* https://github.com/dotaspirit/dotaspirit (draw Dota match data: https://vk.com/rsltdtk)
* https://github.com/engelsjk/go-annular (generative art of annular rings)
* https://github.com/eukarya-inc/reearth-plateauview
* https://github.com/holedaemon/gopster (Topster port)
* https://github.com/html2any/layout (flex layout)
* https://github.com/iand/genster (family trees)
* https://github.com/jansorg/marketplace-stats (reports for JetBrains marketplace)
* https://github.com/kpym/marianne (French repulic logo)
* https://github.com/mrmelon54/favicon (Favicon generator)
* https://github.com/namsor/go-qrcode (QR code encoder)
* https://github.com/octohelm/gio-compose (UI component solution for Gio)
* https://github.com/omniskop/vitrum (GUI framework)
* https://github.com/Pavel7004/GraphPlot (plot graphs)
* https://github.com/peteraba/roadmapper (tracking roadmaps: https://rdmp.app/)
* https://github.com/Preston-PLB/choRenderer (render chord charts in propresenter7)
* https://github.com/stv0g/vand (camper/van monitor and control)
* https://github.com/uncopied/chirograph (barcode security for art)
* https://github.com/uncopied/go-qrcode (QR code encoder)
* https://github.com/wisepythagoras/gis-utils (GIS utilities)
* https://supertxt.net/git/st-int.html (SuperTXT integrations)
- https://github.com/aldernero/gaul (generative art utility library)
- https://github.com/aldernero/sketchy (generative art framework)
- https://github.com/carbocation/genomisc (genomics tools)
- https://github.com/davidhampgonsalves/life-dashboard (show text and emoticons in Kindle)
- https://github.com/davidhampgonsalves/quickdraw (grid of Google Quick Draw Drawings)
- https://github.com/dotaspirit/dotaspirit (draw Dota match data: https://vk.com/rsltdtk)
- https://github.com/engelsjk/go-annular (generative art of annular rings)
- https://github.com/eukarya-inc/reearth-plateauview
- https://github.com/holedaemon/gopster (Topster port)
- https://github.com/html2any/layout (flex layout)
- https://github.com/iand/genster (family trees)
- https://github.com/jansorg/marketplace-stats (reports for JetBrains marketplace)
- https://github.com/kpym/marianne (French repulic logo)
- https://github.com/mrmelon54/favicon (Favicon generator)
- https://github.com/namsor/go-qrcode (QR code encoder)
- https://github.com/octohelm/gio-compose (UI component solution for Gio)
- https://github.com/omniskop/vitrum (GUI framework)
- https://github.com/Pavel7004/GraphPlot (plot graphs)
- https://github.com/peteraba/roadmapper (tracking roadmaps: https://rdmp.app/)
- https://github.com/Preston-PLB/choRenderer (render chord charts in propresenter7)
- https://github.com/stv0g/vand (camper/van monitor and control)
- https://github.com/uncopied/chirograph (barcode security for art)
- https://github.com/uncopied/go-qrcode (QR code encoder)
- https://github.com/wisepythagoras/gis-utils (GIS utilities)
- https://supertxt.net/git/st-int.html (SuperTXT integrations)
- https://github.com/kenshaw/fv (Command-line font viewer using terminal graphics)

## Articles
* [Numerically stable quadratic formula](https://math.stackexchange.com/questions/866331/numerically-stable-algorithm-for-solving-the-quadratic-equation-when-a-is-very/2007723#2007723)
* [Quadratic Bézier length](https://malczak.linuxpl.com/blog/quadratic-bezier-curve-length/)
* [Bézier spline through open path](https://www.particleincell.com/2012/bezier-splines/)
* [Bézier spline through closed path](http://www.jacos.nl/jacos_html/spline/circular/index.html)
* [Point inclusion in polygon test](https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html)

- [Numerically stable quadratic formula](https://math.stackexchange.com/questions/866331/numerically-stable-algorithm-for-solving-the-quadratic-equation-when-a-is-very/2007723#2007723)
- [Quadratic Bézier length](https://malczak.linuxpl.com/blog/quadratic-bezier-curve-length/)
- [Bézier spline through open path](https://www.particleincell.com/2012/bezier-splines/)
- [Bézier spline through closed path](http://www.jacos.nl/jacos_html/spline/circular/index.html)
- [Point inclusion in polygon test](https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html)

#### My own

* [Arc length parametrization](https://tacodewolff.nl/posts/20190525-arc-length/)
- [Arc length parametrization](https://tacodewolff.nl/posts/20190525-arc-length/)

#### Papers

* [M. Walter, A. Fournier, Approximate Arc Length Parametrization, Anais do IX SIBGRAPHI (1996), p. 143--150](https://www.visgraf.impa.br/sibgrapi96/trabs/pdf/a14.pdf)
* [T.F. Hain, et al., Fast, precise flattening of cubic Bézier path and offset curves, Computers & Graphics 29 (2005). p. 656--666](https://doi.org/10.1016/j.cag.2005.08.002)
* [M. Goldapp, Approximation of circular arcs by cubic polynomials, Computer Aided Geometric Design 8 (1991), p. 227--238](https://doi.org/10.1016/0167-8396%2891%2990007-X)
* [L. Maisonobe, Drawing and elliptical arc using polylines, quadratic or cubic Bézier curves (2003)](https://spaceroots.org/documents/ellipse/elliptical-arc.pdf)
* [S.H. Kim and Y.J. Ahn, An approximation of circular arcs by quartic Bezier curves, Computer-Aided Design 39 (2007, p. 490--493)](https://doi.org/10.1016/j.cad.2007.01.004)
* [D.E. Knuth and M.F. Plass, Breaking Paragraphs into Lines, Software: Practive and Experience 11 (1981), p. 1119--1184]()
- [M. Walter, A. Fournier, Approximate Arc Length Parametrization, Anais do IX SIBGRAPHI (1996), p. 143--150](https://www.visgraf.impa.br/sibgrapi96/trabs/pdf/a14.pdf)
- [T.F. Hain, et al., Fast, precise flattening of cubic Bézier path and offset curves, Computers & Graphics 29 (2005). p. 656--666](https://doi.org/10.1016/j.cag.2005.08.002)
- [M. Goldapp, Approximation of circular arcs by cubic polynomials, Computer Aided Geometric Design 8 (1991), p. 227--238](https://doi.org/10.1016/0167-8396%2891%2990007-X)
- [L. Maisonobe, Drawing and elliptical arc using polylines, quadratic or cubic Bézier curves (2003)](https://spaceroots.org/documents/ellipse/elliptical-arc.pdf)
- [S.H. Kim and Y.J. Ahn, An approximation of circular arcs by quartic Bezier curves, Computer-Aided Design 39 (2007, p. 490--493)](https://doi.org/10.1016/j.cad.2007.01.004)
- [D.E. Knuth and M.F. Plass, Breaking Paragraphs into Lines, Software: Practive and Experience 11 (1981), p. 1119--1184]()

## License

Released under the [MIT license](LICENSE.md).

Be aware that Fribidi uses the LGPL license.

0 comments on commit 3711dfc

Please sign in to comment.