RectangleType
public protocol RectangleType : GeometricType
Protocol for geometric types defined by vectors that fill enclosed rectangular areas with a defined location and size.
-
The vector type associated with this
RectangleType
.Declaration
Swift
associatedtype Vector : VectorType
-
The starting location of this rectangle with the minimal coordinates contained within the rectangle.
Declaration
Swift
var location: Vector { get }
-
x
Extension methodGets the X position of this Rectangle.
Declaration
Swift
var x: Vector.Scalar { get }
-
y
Extension methodGets the Y position of this Rectangle.
Declaration
Swift
var y: Vector.Scalar { get }
-
width
Extension methodGets the width of this Rectangle.
Declaration
Swift
var width: Vector.Scalar { get }
-
height
Extension methodGets the height of this Rectangle.
Declaration
Swift
var height: Vector.Scalar { get }
-
top
Extension method -
left
Extension method -
topLeft
Extension methodThe top-left corner of the rectangle.
Declaration
Swift
var topLeft: Vector { get }