MCPcopy Create free account
hub / github.com/cogentcore/core / NewScanner

Function NewScanner

paint/scan/scan.go:475–479  ·  view source on GitHub ↗

NewScanner creates a new Scanner with the given bounds.

(xs Spanner, width, height int)

Source from the content-addressed store, hash-verified

473
474// NewScanner creates a new Scanner with the given bounds.
475func NewScanner(xs Spanner, width, height int) (sc *Scanner) {
476 sc = &Scanner{Spanner: xs, UseNonZeroWinding: true}
477 sc.SetBounds(width, height)
478 return
479}
480
481// SetClip will not affect accumulation of scans, but it will
482// clip drawing of the spans int the Draw func by the clip rectangle.

Callers 8

InitMethod · 0.92
BenchmarkScanFunction · 0.92
BenchmarkFillFunction · 0.92
BenchmarkDashFunction · 0.92
TestRoundRectFunction · 0.92
TestShapesFunction · 0.92
TestGradientFunction · 0.92
TestMultiFunctionFunction · 0.92

Calls 1

SetBoundsMethod · 0.65

Tested by 7

BenchmarkScanFunction · 0.74
BenchmarkFillFunction · 0.74
BenchmarkDashFunction · 0.74
TestRoundRectFunction · 0.74
TestShapesFunction · 0.74
TestGradientFunction · 0.74
TestMultiFunctionFunction · 0.74