mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-08-30 12:12:40 +08:00
feat(字体渲染): 优化字体渲染
This commit is contained in:
@@ -541,6 +541,7 @@ func (r *Renderer) renderPath(ctx *canvas.Context, obj PathObject, pageH float64
|
||||
}
|
||||
if shouldFill && fillColor != nil {
|
||||
ctx.SetFillColor(fillColor)
|
||||
ctx.SetStrokeColor(canvas.Transparent)
|
||||
ctx.DrawPath(0, 0, p)
|
||||
}
|
||||
shouldStroke := true
|
||||
@@ -551,6 +552,7 @@ func (r *Renderer) renderPath(ctx *canvas.Context, obj PathObject, pageH float64
|
||||
if strokeColor == nil {
|
||||
strokeColor = color.Transparent
|
||||
}
|
||||
ctx.SetFillColor(canvas.Transparent)
|
||||
ctx.SetStrokeColor(strokeColor)
|
||||
ctx.SetStrokeWidth(lineWidth)
|
||||
ctx.SetStrokeCapper(lineCap)
|
||||
|
||||
Reference in New Issue
Block a user