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 }
-
xExtension methodGets the X position of this Rectangle.
Declaration
Swift
var x: Vector.Scalar { get } -
yExtension methodGets the Y position of this Rectangle.
Declaration
Swift
var y: Vector.Scalar { get } -
widthExtension methodGets the width of this Rectangle.
Declaration
Swift
var width: Vector.Scalar { get } -
heightExtension methodGets the height of this Rectangle.
Declaration
Swift
var height: Vector.Scalar { get } -
topExtension method -
leftExtension method -
topLeftExtension methodThe top-left corner of the rectangle.
Declaration
Swift
var topLeft: Vector { get }