Rectangle2D
public struct Rectangle2D : Hashable
Represents a 2D rectangle defined by the origin and size.
-
The origin specifies the top-left corner of the rectangle. When this point is used to indicate the coordinates on a view, then (0,0) will mark the top-left corner of the view. The size determines the width and height of the rectangle. The width expands towards the right of the view. The height expands towards the bottom of the view.
Declaration
Swift
public var origin: Point2D -
The size specifies the width and height of the rectangle.
Declaration
Swift
public var size: Size2D