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

Method Scan

path_scanner.go:22–28  ·  view source on GitHub ↗

Scan scans a new path segment and should be called before the other methods.

()

Source from the content-addressed store, hash-verified

20
21// Scan scans a new path segment and should be called before the other methods.
22func (s *PathScanner) Scan() bool {
23 if s.i+1 < len(s.p.d) {
24 s.i += cmdLen(s.p.d[s.i+1])
25 return true
26 }
27 return false
28}
29
30// Cmd returns the current path segment command.
31func (s *PathScanner) Cmd() float64 {

Callers 11

TestIntersectionLineLineFunction · 0.45
TestIntersectionLineQuadFunction · 0.45
TestIntersectionLineCubeFunction · 0.45
BenchmarkScannerFunction · 0.45
mainFunction · 0.45
writePathMethod · 0.45
renderPathMethod · 0.45
writePathMethod · 0.45

Calls 1

cmdLenFunction · 0.85

Tested by 7

TestIntersectionLineLineFunction · 0.36
TestIntersectionLineQuadFunction · 0.36
TestIntersectionLineCubeFunction · 0.36
BenchmarkScannerFunction · 0.36