llgcode/draw2d

How `Path ` info are transferred to the `github.com/golang/freetype/raster`

Closed this issue · 1 comments

Question

What I'm trying to figure out now:

How github.com/llgcode/draw2d/draw2dimg package transfers its Path *draw2d.Path info to the github.com/golang/freetype/raster package. For some reason, I cannot find any transfer of Path info.

Details

The statement which triggers the painting process of github.com/golang/freetype/raster is the following:

rasterizer.Rasterize(gc.painter)

The Path info is stored by this field:

Path *draw2d.Path

Hi @Megidd,
it is done here the draw2d path is transformed using FtLineBuilder{Adder: gc.fillRasterizer} that is able to transform a draw2d path to a freetype raster.Adder

regards