mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 15:06:46 +08:00
feat(字体渲染): 优化字体渲染
This commit is contained in:
1 parent
8edc2a0bb5
commit
a06cfe17b6
1 file changed
+2
@@ -541,6 +541,7 @@ func (r *Renderer) renderPath(ctx *canvas.Context, obj PathObject, pageH float64
|
|||||||
}
|
}
|
||||||
if shouldFill && fillColor != nil {
|
if shouldFill && fillColor != nil {
|
||||||
ctx.SetFillColor(fillColor)
|
ctx.SetFillColor(fillColor)
|
||||||
|
ctx.SetStrokeColor(canvas.Transparent)
|
||||||
ctx.DrawPath(0, 0, p)
|
ctx.DrawPath(0, 0, p)
|
||||||
}
|
}
|
||||||
shouldStroke := true
|
shouldStroke := true
|
||||||
@@ -551,6 +552,7 @@ func (r *Renderer) renderPath(ctx *canvas.Context, obj PathObject, pageH float64
|
|||||||
if strokeColor == nil {
|
if strokeColor == nil {
|
||||||
strokeColor = color.Transparent
|
strokeColor = color.Transparent
|
||||||
}
|
}
|
||||||
|
ctx.SetFillColor(canvas.Transparent)
|
||||||
ctx.SetStrokeColor(strokeColor)
|
ctx.SetStrokeColor(strokeColor)
|
||||||
ctx.SetStrokeWidth(lineWidth)
|
ctx.SetStrokeWidth(lineWidth)
|
||||||
ctx.SetStrokeCapper(lineCap)
|
ctx.SetStrokeCapper(lineCap)
|
||||||
|
|||||||
Reference in new issue
Block a user