2002-08-17 05:27:34 +00:00
|
|
|
#ifndef __ruamoko_Rect_h
|
|
|
|
#define __ruamoko_Rect_h
|
|
|
|
|
|
|
|
#include "Object.h"
|
|
|
|
#include "Point.h"
|
|
|
|
#include "Size.h"
|
|
|
|
|
|
|
|
@interface Rect: Object
|
|
|
|
{
|
|
|
|
@public
|
|
|
|
Point origin;
|
|
|
|
Size size;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (id) initWithComponents: (integer)x : (integer)y : (integer)w : (integer)h;
|
2002-08-17 07:17:53 +00:00
|
|
|
- (id) initWithOrigin: (Point)anOrigin size: (Size)aSize;
|
2002-08-17 05:27:34 +00:00
|
|
|
- (id) initWithRect: (Rect)aRect;
|
|
|
|
- (id) copy;
|
|
|
|
|
2002-08-17 07:17:53 +00:00
|
|
|
#if 0
|
2002-08-17 05:27:34 +00:00
|
|
|
- (BOOL) intersectsRect: (Rect)aRect;
|
|
|
|
- (BOOL) containsPoint: (Point)aPoint;
|
|
|
|
- (BOOL) containsRect: (Rect)aRect;
|
|
|
|
- (BOOL) isEqualToRect: (Rect)aRect;
|
|
|
|
- (BOOL) isEmpty;
|
|
|
|
|
|
|
|
- (Rect) intersectionWithRect: (Rect)aRect;
|
|
|
|
- (Rect) unionWithRect: (Rect)aRect;
|
|
|
|
|
|
|
|
- (Rect) insetBySize: (Size)aSize;
|
|
|
|
- (Rect) offsetBySize: (Size)aSize;
|
2002-08-17 07:17:53 +00:00
|
|
|
#endif
|
2002-08-17 05:27:34 +00:00
|
|
|
|
|
|
|
- (Point) origin;
|
|
|
|
- (Size) size;
|
|
|
|
|
2002-08-17 07:17:53 +00:00
|
|
|
- (void) setOrigin: (Point)aPoint;
|
2002-08-17 05:27:34 +00:00
|
|
|
- (void) setSize: (Size)aSize;
|
2002-08-17 07:17:53 +00:00
|
|
|
- (void) setRect: (Rect)aRect;
|
2002-08-17 05:27:34 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif //__ruamoko_Rect_h
|