union(_:eoFill:)
Returns a new shape with filled regions in either this shape or the given shape.
Declaration
nonisolated func union<T>(_ other: T, eoFill: Bool = false) -> some Shape where T : Shape
Parameters
- other:
The shape to union.
- eoFill:
Whether to use the even-odd rule for determining which areas to treat as the interior of the shapes (if true), or the non-zero rule (if false).
Return Value
A new shape.
Discussion
The filled region of resulting shape is the combination of the filled region of both shapes added together.
Any unclosed subpaths in either shape are assumed to be closed. The result of filling this shape using either even-odd or non-zero fill rules is identical.