iphone-common-codes-ccteam源代码 CCRect.h

//
// CCRect.h
// CCFC
//
// Created by xichen on 11-12-28.
// Copyright 2011 ccteam. All rights reserved.
//


#import <Foundation/Foundation.h>




@interface CCRect : NSObject
{
@public
CGPoint origin;
CGSize size;
}


- (id)initWithX:(CGFloat)x y:(CGFloat)y width:(CGFloat)width height:(CGFloat)height;
- (id)initWithOrigin:(CGPoint)aOrigin size:(CGSize)aSize;
- (id)initWithCGRect:(CGRect)rect;


+ (id)rectWithX:(CGFloat)x y:(CGFloat)y width:(CGFloat)width height:(CGFloat)height;
+ (id)rectWithOrigin:(CGPoint)aOrigin size:(CGSize)aSize;
+ (id)rectWithCGRect:(CGRect)rect;


- (void)dealloc;


- (CGFloat)x;
- (CGFloat)y;
- (CGFloat)width;
- (CGFloat)height;
- (void)setX:(CGFloat)x;
- (void)setY:(CGFloat)y;
- (void)setWidth:(CGFloat)width;
- (void)setHeight:(CGFloat)height;


- (void)setX:(CGFloat)x y:(CGFloat)y;
- (void)setWidth:(CGFloat)width height:(CGFloat)height;


- (BOOL)isEqualTo:(CCRect *)rect;
- (BOOL)isEqualToCGRect:(CGRect)rect;
- (BOOL)isZero;


- (CGRect)toCGRect;


@end

 

可能有更新:

 googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCRect.h

 github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCRect.h

 

posted @ 2012-01-03 14:06  cc_team  阅读(197)  评论(0编辑  收藏  举报