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
– 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
– 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
– 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