MCPcopy
hub / github.com/tdewolff/canvas / toArcFlags

Function toArcFlags

path.go:86–90  ·  view source on GitHub ↗

toArcFlags converts to the largeArc and sweep boolean flags given its value in the path.

(f float64)

Source from the content-addressed store, hash-verified

84
85// toArcFlags converts to the largeArc and sweep boolean flags given its value in the path.
86func toArcFlags(f float64) (bool, bool) {
87 large := (f == 1.0 || f == 3.0)
88 sweep := (f == 2.0 || f == 3.0)
89 return large, sweep
90}
91
92// fromArcFlags converts the largeArc and sweep boolean flags to a value stored in the path.
93func fromArcFlags(large, sweep bool) float64 {

Callers 15

ArcMethod · 0.85
ArcMethod · 0.85
RayIntersectionsMethod · 0.85
FastClipMethod · 0.85
JoinMethod · 0.85
simplifyToCoordsMethod · 0.85
directionMethod · 0.85
curvatureMethod · 0.85
FastBoundsMethod · 0.85
BoundsMethod · 0.85
LengthMethod · 0.85
TransformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected