You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: path_stroke.go
+27-6Lines changed: 27 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,13 @@ import (
4
4
"math"
5
5
)
6
6
7
+
// FastStroke skips "settling" the resulting paths for Path.Offset and Path.Stroke, which ensures a well-formed path without overlapping
8
+
// nor holes. This fixes overlapping strokes or the inner-bend for corners. Inner-bends are currently already fixed for two line
9
+
// segments, but will otherwise leave a hole. Overlapping strokes may not be a problem when using the NonZero winding order for drawing.
10
+
// Strokes that are significantly larger than the path itself may be problematic with this enabled, but it may provide a stark
11
+
// performance gain for most (trivial) cases.
12
+
varFastStroke=false
13
+
7
14
// NOTE: implementation inspired from github.com/golang/freetype/raster/stroke.go
8
15
9
16
// Capper implements Cap, with rhs the path to append to, halfWidth the half width of the stroke, pivot the pivot point around which to construct a cap, and n0 the normal at the start of the path. The length of n0 is equal to the halfWidth.
0 commit comments