2010-07-22 15:20:04 +00:00
|
|
|
//
|
|
|
|
// Rectangle.h
|
|
|
|
// XNI
|
|
|
|
//
|
|
|
|
// Created by Matej Jan on 22.7.10.
|
|
|
|
// Copyright 2010 Retronator, Razum. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
2010-07-22 16:13:55 +00:00
|
|
|
#import <UIKit/UIKit.h>
|
2010-07-22 15:20:04 +00:00
|
|
|
|
|
|
|
#import "Retronator.Xni.Framework.classes.h"
|
|
|
|
|
2010-12-08 04:57:47 +00:00
|
|
|
@interface Rectangle : NSObject <NSCopying> {
|
2010-07-22 15:20:04 +00:00
|
|
|
RectangleStruct data;
|
|
|
|
}
|
|
|
|
|
2010-09-21 21:46:53 +00:00
|
|
|
- (id) initWithX:(int)x y:(int)y width:(int)width height:(int)height;
|
2010-12-14 23:28:16 +00:00
|
|
|
- (id) initWithRectangleStruct:(RectangleStruct*) rectangleStruct;
|
2010-07-22 15:20:04 +00:00
|
|
|
- (id) initWithRectangle:(Rectangle*) rectangle;
|
|
|
|
|
2010-09-21 21:46:53 +00:00
|
|
|
+ (Rectangle*) rectangleWithX:(int)x y:(int)y width:(int)width height:(int)height;
|
2010-07-22 15:20:04 +00:00
|
|
|
+ (Rectangle*) rectangleWithStruct:(RectangleStruct*) rectangleStruct;
|
|
|
|
+ (Rectangle*) rectangleWithRectangle:(Rectangle*) rectangle;
|
2010-07-22 16:13:55 +00:00
|
|
|
+ (Rectangle*) rectangleWithCGRect:(CGRect) cgRect;
|
2010-07-22 15:20:04 +00:00
|
|
|
|
|
|
|
@property (nonatomic) int x;
|
|
|
|
@property (nonatomic) int y;
|
|
|
|
@property (nonatomic) int width;
|
|
|
|
@property (nonatomic) int height;
|
|
|
|
@property (nonatomic, readonly) RectangleStruct *data;
|
|
|
|
|
2010-12-08 04:57:47 +00:00
|
|
|
- (Rectangle*) set:(Rectangle*)value;
|
|
|
|
|
2011-01-15 02:05:37 +00:00
|
|
|
- (BOOL) containsX:(int)x y:(int)y;
|
|
|
|
- (BOOL) containsPoint:(XniPoint*)point;
|
|
|
|
|
2010-07-22 16:13:55 +00:00
|
|
|
- (BOOL) equals:(Rectangle*)rectangle;
|
|
|
|
|
2010-07-22 15:20:04 +00:00
|
|
|
+ (Rectangle*) empty;
|
|
|
|
|
|
|
|
@end
|