Created
April 25, 2010 17:46
-
-
Save takuma104/378573 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "flalib.h" | |
| @interface TestSprite : FLSprite { | |
| } | |
| @end | |
| @implementation TestSprite | |
| - (id)init { | |
| if ((self = [super init])) { | |
| UIImage *image = [UIImage imageNamed:@"test256x256.png"]; | |
| FLBitmapData *bitmapData = [FLBitmapData bitmapDataWithUIImage:image]; | |
| FLBitmap *bitmap = [FLBitmap bitmap:bitmapData]; | |
| bitmap.x = 10; | |
| bitmap.y = 10; | |
| [self addChild:bitmap]; | |
| FLShape *shape = [FLShape shape]; | |
| [shape.graphics beginFill :0xff0000 :0.5f]; | |
| [shape.graphics drawCircle :0 :0 :20.f]; | |
| [shape.graphics endFill]; | |
| [shape.graphics beginFill :0x00ff00 :0.5f]; | |
| [shape.graphics drawCircle :40 :40 :30.f]; | |
| [shape.graphics endFill]; | |
| [shape.graphics beginFill :0x0000ff :0.5f]; | |
| [shape.graphics drawCircle :100 :100 :70.f]; | |
| [shape.graphics endFill]; | |
| [bitmapData draw:shape]; | |
| } | |
| return self; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment