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

Method CP2

path_scanner.go:59–65  ·  view source on GitHub ↗

CP2 returns the second control point for cubic Béziers.

()

Source from the content-addressed store, hash-verified

57
58// CP2 returns the second control point for cubic Béziers.
59func (s *PathScanner) CP2() Point {
60 if s.p.d[s.i] != CubeToCmd {
61 panic("must be cubic Bézier")
62 }
63 i := s.i - cmdLen(s.p.d[s.i]) + 1
64 return Point{s.p.d[i+3], s.p.d[i+4]}
65}
66
67// Arc returns the arguments for arcs (rx,ry,rot,large,sweep).
68func (s *PathScanner) Arc() (float64, float64, float64, bool, bool) {

Callers 1

PathMethod · 0.95

Calls 1

cmdLenFunction · 0.85

Tested by

no test coverage detected