A struct describing a rectangle
Create a Rectangle
- (instancetype)initWithX:(float)x
y:(float)y
width:(float)width
height:(float)height;
init!(x: Float, y: Float, width: Float, height: Float)
The top-left x value
The top-left y value
The width
The height
An new SDLRectangle object
Create a Rectangle from a CGRect
- (instancetype)initWithCGRect:(CGRect)rect;
init!(cgRect rect: CGRect)
The rectangle to use
An new SDLRectangle object
The X-coordinate of the user control
Required, Float
@property (nonatomic, strong) NSNumber<SDLFloat> *x;
var x: (NSNumber & SDLFloat)! { get set }
The Y-coordinate of the user control
Required, Float
@property (nonatomic, strong) NSNumber<SDLFloat> *y;
var y: (NSNumber & SDLFloat)! { get set }
The width of the user control’s bounding rectangle
Required, Float
@property (nonatomic, strong) NSNumber<SDLFloat> *width;
var width: (NSNumber & SDLFloat)! { get set }
The height of the user control’s bounding rectangle
Required, Float
@property (nonatomic, strong) NSNumber<SDLFloat> *height;
var height: (NSNumber & SDLFloat)! { get set }