Created
February 26, 2013 21:31
-
-
Save C4Code/5042399 to your computer and use it in GitHub Desktop.
Basic Shape Mask
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
| // | |
| // C4WorkSpace.m | |
| // | |
| // Created by Travis Kirton | |
| // | |
| #import "C4WorkSpace.h" | |
| @implementation C4WorkSpace { | |
| C4Image *image; | |
| C4Shape *shape; | |
| } | |
| -(void)setup { | |
| [self setupImageAndShape]; | |
| image.mask = shape; | |
| } | |
| -(void)setupImageAndShape { | |
| image = [C4Image imageNamed:@"C4Table"]; | |
| image.center = self.canvas.center; | |
| shape = [C4Shape ellipse:CGRectMake(0, 0, image.height, image.height)]; | |
| shape.center = CGPointMake(image.width/2,image.height/2); | |
| [self.canvas addImage:image]; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment