Created
May 4, 2012 03:29
-
-
Save robmerrell/2591779 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
// TODO can we get rid of these? | |
// Create a texture for non selected and selected points | |
unselected_point = [[SPTexture alloc] initWithWidth:200 height:200 draw:^(CGContextRef context) { | |
CGContextSetLineWidth(context, 2.0f); | |
CGContextSetRGBFillColor(context, 0.7f, 0.7f, 0.7f, 1.0f); | |
CGContextSetRGBStrokeColor(context, 0.7f, 0.7f, 0.7f, 1.0f); | |
CGRect circlePoint = (CGRectMake(0.0f, 0.0f, 8.0f, 8.0f)); | |
CGContextFillEllipseInRect(context, circlePoint); | |
}]; | |
[[TextureManager sharedTextureManager] cacheTexture:unselected_point withName:@"unselected_point"]; | |
selected_point = [[SPTexture alloc] initWithWidth:200 height:200 draw:^(CGContextRef context) { | |
CGContextSetLineWidth(context, 2.0f); | |
CGContextSetRGBFillColor(context, 0.0f, 1.0f, 1.0f, 1.0f); | |
CGContextSetRGBStrokeColor(context, 0.0f, 1.0f, 1.0f, 1.0f); | |
CGRect circlePoint = (CGRectMake(0.0f, 0.0f, 8.0f, 8.0f)); | |
CGContextFillEllipseInRect(context, circlePoint); | |
}]; | |
[[TextureManager sharedTextureManager] cacheTexture:selected_point withName:@"selected_point"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment