MCPcopy Index your code
hub / github.com/tdewolff/canvas / Not

Method Not

path_intersection.go:198–200  ·  view source on GitHub ↗

Not returns the boolean path operation of path p NOT q, i.e. the difference of both. It removes all self-intersections and overlapping areas, orients all filling paths CCW and all holes CW, and tries to separate paths as much as possible. Paths are grouped by the filling/outer ring followed by the c

(q *Path)

Source from the content-addressed store, hash-verified

196// flat. Path q is implicitly closed. It runs in O((n + k) log n), with n the number of segments,
197// and k the number of intersections.
198func (p *Path) Not(q *Path) *Path {
199 return bentleyOttmann(p.Split(), q.Split(), opNOT, NonZero).Merge()
200}
201
202// Not is the same as Path.Not, but faster if paths are already split. Each resulting path
203// is a single filling path followed by its holes as subpaths.

Callers 13

DecorateMethod · 0.95
DecorateMethod · 0.95
DecorateMethod · 0.95
DecorateMethod · 0.95
DecorateMethod · 0.95
DecorateMethod · 0.95
DecorateMethod · 0.95
DecorateMethod · 0.95
DrawPreviewWithAssetsFunction · 0.45
TestPathNotFunction · 0.45
drawFunction · 0.45
draw2Function · 0.45

Calls 3

SplitMethod · 0.95
bentleyOttmannFunction · 0.85
MergeMethod · 0.80

Tested by 1

TestPathNotFunction · 0.36