Or returns the boolean path operation of path p OR q, i.e. the union of both. It 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 corre
(q *Path)
| 162 | // flat. Path q is implicitly closed. It runs in O((n + k) log n), with n the number of segments, |
| 163 | // and k the number of intersections. |
| 164 | func (p *Path) Or(q *Path) *Path { |
| 165 | return bentleyOttmann(p.Split(), q.Split(), opOR, NonZero).Merge() |
| 166 | } |
| 167 | |
| 168 | // Or is the same as Path.Or, but faster if paths are already split. Each resulting path |
| 169 | // is a single filling path followed by its holes as subpaths. |