From c773a25ad1839400c5da707d8df0ecddb97d565a Mon Sep 17 00:00:00 2001 From: tinne26 Date: Fri, 13 May 2022 14:02:39 +0200 Subject: [PATCH] I'll get it right, eventually. --- docs/rasterize-outlines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rasterize-outlines.md b/docs/rasterize-outlines.md index a5c8484..bdc316a 100644 --- a/docs/rasterize-outlines.md +++ b/docs/rasterize-outlines.md @@ -1,5 +1,5 @@ # Rasterizing outlines -This document aims to give a general overview of the rasterization algorithms used by [`vector.Rasterizer`](https://pkg.go.dev/golang.org/x/image/vector) and [`emask.EdgeMarker`](https://pkg.go.dev/github.com/tinne26/etxt/emask#EdgeMarkerRasterizer). +This document aims to give a general overview of the rasterization algorithms used by [`vector.Rasterizer`](https://pkg.go.dev/golang.org/x/image/vector) and [`emask.EdgeMarkerRasterizer`](https://pkg.go.dev/github.com/tinne26/etxt/emask#EdgeMarkerRasterizer). While this package focuses on glyph rendering, these algorithms are suitable for general 2D vector graphics. That said, they are CPU-based processes best suited for small shapes; in the case of big shapes, GPU algorithms based on triangulation and [spline curve rendering](https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-25-rendering-vector-art-gpu) may be a better choice. @@ -14,7 +14,7 @@ Outlines are defined using two primitive operations: - Moving the "pen position" to a specific coordinate. - Adding a straight segment from the current "pen position" to a new position. -While quadratic and cubic Bézier curves are also allowed in `vector.Rasterizer` and `emask.EdgeMarker`, those aren't primitives; curves are internally converted to multiple straight lines before processing. +While quadratic and cubic Bézier curves are also allowed in `vector.Rasterizer` and `emask.EdgeMarkerRasterizer`, those aren't primitives; curves are internally converted to multiple straight lines before processing. Notice also that while we often talk about lines and pen positions and outlines, it's best that you think in terms of "boundaries" and "delimiting segments". Boundaries have no width, what matters is the areas they delimit.