Instance Method

byUnion(with:)

Returns a new region created by combining the contents of this region with another region.

Declaration

func byUnion(with region: SKRegion) -> Self

Parameters

region

The region to combine with the current region.

Return Value

A new region whose contents include all points that are included in either region.

See Also

Creating and Initializing Region Objects

class func infinite() -> Self

Returns a region that defines a region that includes all points.

init(size: CGSize)

Initializes a new region with a rectangular area.

init(radius: Float)

Initializes a new region with a circular area.

init(path: CGPath)

Initializes a new region using a Core Graphics path.

func inverse() -> Self

Returns a new region that is the mathematical inverse of an existing region.

func byDifference(from: SKRegion) -> Self

Returns a new region created by subtracting the contents of another region from this region.

func byIntersection(with: SKRegion) -> Self

Returns a new region created by intersecting the contents of this region with another region.