workaround freetype/raster issues

This commit is contained in:
Michael Fogleman 2016-02-24 21:45:09 -05:00
parent 187c2bb9a5
commit 60b91a20e1

View File

@ -345,6 +345,10 @@ func (dc *Context) StrokePreserve() {
path := dc.strokePath path := dc.strokePath
if len(dc.dashes) > 0 { if len(dc.dashes) > 0 {
path = dashed(path, dc.dashes) path = dashed(path, dc.dashes)
} else {
// TODO: this is a temporary workaround to remove tiny segments
// that result in rendering issues
path = rasterPath(flattenPath(path))
} }
painter := raster.NewRGBAPainter(dc.im) painter := raster.NewRGBAPainter(dc.im)
painter.SetColor(dc.color) painter.SetColor(dc.color)