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

Method Start

path_scanner.go:41–47  ·  view source on GitHub ↗

Start returns the current path segment start position.

()

Source from the content-addressed store, hash-verified

39
40// Start returns the current path segment start position.
41func (s *PathScanner) Start() Point {
42 i := s.i - cmdLen(s.p.d[s.i])
43 if i == -1 {
44 return Point{}
45 }
46 return Point{s.p.d[i-2], s.p.d[i-1]}
47}
48
49// CP1 returns the first control point for quadratic and cubic Béziers.
50func (s *PathScanner) CP1() Point {

Callers 8

PathMethod · 0.95
ToScanxScannerMethod · 0.45
TestIntersectionLineLineFunction · 0.45
TestIntersectionLineQuadFunction · 0.45
TestIntersectionLineCubeFunction · 0.45

Calls 1

cmdLenFunction · 0.85