Skip to content

Instantly share code, notes, and snippets.

@kaykay
Created June 17, 2009 18:45
Show Gist options
  • Save kaykay/131412 to your computer and use it in GitHub Desktop.
Save kaykay/131412 to your computer and use it in GitHub Desktop.
@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