Created
June 17, 2009 18:45
-
-
Save kaykay/131412 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
@implementation RectView : CPView | |
{ | |
} | |
-(void) drawRect | |
{ | |
[super drawRect]; | |
var ov = [CPBezierPath bezierPath]; | |
[ov appendBezierPathWithOvalInRect:[self frame]]; | |
console.debug([self frame]); | |
CGContextSetLineWidth(1.0); | |
[[CPColor blackColor] set]; | |
[ov stroke]; | |
[ov fill]; | |
} | |
@end | |
its used as: | |
rect_view = [[RectView alloc] initWithFrame:[__delegate frame]]; | |
[rect_view setNeedsDisplay:YES]; | |
console.debug(__delegate); | |
[__delegate addSubview: rect_view]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment