blob: 04d9e76cce044a795e7540fd4321553259bcca5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
//
// SDLRectangle.h
// SmartDeviceLink-iOS
//
// Created by Joel Fischer on 8/23/17.
// Copyright © 2017 smartdevicelink. All rights reserved.
//
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import "NSNumber+NumberType.h"
#import "SDLRPCStruct.h"
/**
A struct describing a rectangle
*/
@interface SDLRectangle : SDLRPCStruct
/**
Create a Rectangle
@param x The top-left x value
@param y The top-left y value
@param width The width
@param height The height
@return An new SDLRectangle object
*/
- (instancetype)initWithX:(float)x y:(float)y width:(float)width height:(float)height;
/**
Create a Rectangle from a CGRect
@param rect The rectangle to use
@return An new SDLRectangle object
*/
- (instancetype)initWithCGRect:(CGRect)rect;
/**
* The X-coordinate of the user control
* Required, Float
*/
@property (strong, nonatomic) NSNumber<SDLFloat> *x;
/**
* The Y-coordinate of the user control
* Required, Float
*/
@property (strong, nonatomic) NSNumber<SDLFloat> *y;
/**
* The width of the user control's bounding rectangle
* Required, Float
*/
@property (strong, nonatomic) NSNumber<SDLFloat> *width;
/**
* The height of the user control's bounding rectangle
* Required, Float
*/
@property (strong, nonatomic) NSNumber<SDLFloat> *height;
@end
|