ISRect Class Reference
Inherits from | NSObject |
---|---|
Declared in | ISRect.h |
Overview
Class used to represent a rectangle defined by 4 int values (left, top, right, bottom) (ex: 0/0/50/150).
center
Center of the rectangle.
@property (nonatomic, readwrite) CGPoint center
Declared In
ISRect.h
bottomLeft
Bottom left point.
@property (nonatomic, readonly) CGPoint bottomLeft
Declared In
ISRect.h
bottomRight
Bottom right point.
@property (nonatomic, readonly) CGPoint bottomRight
Declared In
ISRect.h
– initWithLeft:andTop:andRight:andBottom:
Main constructor.
- (instancetype)initWithLeft:(int)left andTop:(int)top andRight:(int)right andBottom:(int)bottom
Parameters
left |
Left int value (X coordinate). |
---|---|
top |
Top int value (Y coordinate). |
right |
Right int value (X coordinate). |
bottom |
Bottom int value (Y coordinate). |
Declared In
ISRect.h
– initWithLeft:andTop:andWidth:andHeight:
Constructor.
- (instancetype)initWithLeft:(int)left andTop:(int)top andWidth:(int)width andHeight:(int)height
Parameters
left |
Left int value (X coordinate). |
---|---|
top |
Top int value (Y coordinate). |
width |
Rect int width. |
height |
Rect int height. |
Declared In
ISRect.h
– initWithCenterX:andCenterY:andWidth:andHeight:
Constructor.
- (instancetype)initWithCenterX:(int)centerX andCenterY:(int)centerY andWidth:(int)width andHeight:(int)height
Parameters
centerX |
Rect center X int coordinate. |
---|---|
centerY |
Rect center Y int coordinate. |
width |
Rect int width. |
height |
Rect int height. |
Declared In
ISRect.h
– initWithCGRect:
Constructor.
- (instancetype)initWithCGRect:(CGRect)rect
Parameters
rect |
CGRect to use for instantiate the new one. |
---|
Declared In
ISRect.h
+ ISRectWithLeft:andTop:andRight:andBottom:
Static main constructor.
+ (instancetype)ISRectWithLeft:(int)left andTop:(int)top andRight:(int)right andBottom:(int)bottom
Parameters
left |
Left int value (X coordinate). |
---|---|
top |
Top int value (Y coordinate). |
right |
Right int value (X coordinate). |
bottom |
Bottom int value (Y coordinate). |
Declared In
ISRect.h
+ ISRectWithCGRect:
Static constructor.
+ (instancetype)ISRectWithCGRect:(CGRect)rect
Parameters
rect |
CGRect to use for instantiate the new one. |
---|
Declared In
ISRect.h
– contains:
Method used to know if the ISRect contains the given point.
- (Boolean)contains:(CGPoint)point
Parameters
point |
Point to test. |
---|
Return Value
YES if the ISRect contains the point, otherwise NO.
Declared In
ISRect.h
– containsWithX:andY:
Method used to know if the ISRect contains the given coordinates.
- (Boolean)containsWithX:(int)x andY:(int)y
Parameters
x |
X coordinate to test. |
---|---|
y |
Y coordinate to test. |
Return Value
YES if the ISRect contains the coordinates, otherwise NO.
Declared In
ISRect.h
– toCGRect
Method used to convert the ISRect into CGRect.
- (CGRect)toCGRect
Return Value
The related converted CGRect.
Declared In
ISRect.h
– centerX
Method used to get the center x coordinate.
- (int)centerX
Return Value
The center x coordinate.
Declared In
ISRect.h
– centerY
Method used to get the center y coordinate.
- (int)centerY
Return Value
The center y coordinate.
Declared In
ISRect.h
– width
Method used to get ISRect width.
- (int)width
Return Value
The ISRect width.
Declared In
ISRect.h
– height
Method used to get ISRect height.
- (int)height
Return Value
The ISRect height.
Declared In
ISRect.h
– offset:
Method called to offset ISRect.
- (void)offset:(CGPoint)offset
Parameters
offset |
The offset to apply. |
---|
Declared In
ISRect.h
– isEqualToISRectWithLeft:andTop:andRight:andBottom:
Method used to know if the ISRect is equal to an specified ISRect.
- (Boolean)isEqualToISRectWithLeft:(int)left andTop:(int)top andRight:(int)right andBottom:(int)bottom
Parameters
left |
Left value of the ISRect to compare. |
---|---|
top |
Top value of the ISRect to compare. |
right |
Right value of the ISRect to compare. |
bottom |
Bottom value of the ISRect to compare. |
Return Value
YES if the two ISRect are equals, otherwise NO.
Declared In
ISRect.h
– isEqualToISRect:
Method used to know if the ISRect is equal to an specified ISRect.
- (Boolean)isEqualToISRect:(ISRect *)rect
Parameters
rect |
ISRect to compare. |
---|
Return Value
YES if the two ISRect are equals, otherwise NO.
Declared In
ISRect.h
– updateWithLeft:andTop:andRight:andBottom:
Method used to update the ISRect with 4 specified values.
- (void)updateWithLeft:(int)left andTop:(int)top andRight:(int)right andBottom:(int)bottom
Parameters
left |
Left use for update. |
---|---|
top |
Top value use for update. |
right |
Right value use for update. |
bottom |
Bottom value use for update. |
Declared In
ISRect.h
– updateWithISRect:
Method used to update the ISRect with a specified ISRect.
- (void)updateWithISRect:(ISRect *)rect
Parameters
rect |
ISRect to use for update. |
---|
Declared In
ISRect.h