Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
SDLRectangle

SDLRectangle Class Reference

Section Contents

Overview

A struct describing a rectangle

-initWithX:y:width:height:

Create a Rectangle

Objective-C

- (instancetype)initWithX:(float)x
                        y:(float)y
                    width:(float)width
                   height:(float)height;

Swift

init!(x: Float, y: Float, width: Float, height: Float)

Parameters

x

The top-left x value

y

The top-left y value

width

The width

height

The height

Return Value

An new SDLRectangle object

-initWithCGRect:

Create a Rectangle from a CGRect

Objective-C

- (instancetype)initWithCGRect:(CGRect)rect;

Swift

init!(cgRect rect: CGRect)

Parameters

rect

The rectangle to use

Return Value

An new SDLRectangle object

x

The X-coordinate of the user control

Required, Float

Objective-C

@property (nonatomic, strong) NSNumber<SDLFloat> *x;

Swift

var x: (NSNumber & SDLFloat)! { get set }

y

The Y-coordinate of the user control

Required, Float

Objective-C

@property (nonatomic, strong) NSNumber<SDLFloat> *y;

Swift

var y: (NSNumber & SDLFloat)! { get set }

width

The width of the user control’s bounding rectangle

Required, Float

Objective-C

@property (nonatomic, strong) NSNumber<SDLFloat> *width;

Swift

var width: (NSNumber & SDLFloat)! { get set }

height

The height of the user control’s bounding rectangle

Required, Float

Objective-C

@property (nonatomic, strong) NSNumber<SDLFloat> *height;

Swift

var height: (NSNumber & SDLFloat)! { get set }
View on GitHub.com
Previous Section Next Section