mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
e78ea6f919
commit
3b9f88cbba
16 files changed
+383
-43
No files matched your search
@@ -70,12 +70,12 @@ func (c *canvasPageCompiler) RenderPath(path *canvas.Path, style canvas.Style, m
|
||||
}
|
||||
if style.HasStroke() {
|
||||
stroke := path
|
||||
options := canvasStrokeOptions(style.StrokeWidth, style.StrokeCapper, style.StrokeJoiner, canvas.PixelTolerance/(c.page.DPI/25.4))
|
||||
if len(style.Dashes) > 0 {
|
||||
offset, dashes := canvas.ScaleDash(style.StrokeWidth, style.DashOffset, style.Dashes)
|
||||
stroke = stroke.Dash(offset, dashes...)
|
||||
options.DashOffset, options.Dashes = canvas.ScaleDash(style.StrokeWidth, style.DashOffset, style.Dashes)
|
||||
}
|
||||
var err error
|
||||
stroke, err = canvasStrokePath(c.geometry, stroke, canvasStrokeOptions(style.StrokeWidth, style.StrokeCapper, style.StrokeJoiner, canvas.PixelTolerance/(c.page.DPI/25.4)))
|
||||
stroke, err = canvasStrokePath(c.geometry, stroke, options)
|
||||
if err != nil {
|
||||
c.err = err
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user