Skip to content

Instantly share code, notes, and snippets.

@j4johnfox
Created November 4, 2008 19:32
Show Gist options
  • Save j4johnfox/22194 to your computer and use it in GitHub Desktop.
Save j4johnfox/22194 to your computer and use it in GitHub Desktop.
@import <AppKit/CPImageView.j>
@import <AppKit/CPGraphicsContext.j>
@import <AppKit/CGContext.j>
@import <AppKit/CPColor.j>
@implementation MMSImageAnnotationView : CPImageView
{
CPArray markerInfoDictArray;
BOOL showMarkers;
}
- (id)initWithFrame:(CGRect)aFrame
{
return [super initWithFrame:aFrame];
}
- (void)drawRect:(CGRect)aRect
{
CPLog("MMSImageAnnotationView here in drawRect");
var myRect = CGRectMake(50, 50, 320, 240);
var myContext = [[CPGraphicsContext currentContext] graphicsPort];
var myColor = [CPColor yellowColor];
CGContextSetFillColor(myContext, myColor);
CGContextSetLineWidth(myContext, 3.0);
CGContextStrokeRect(myContext, myRect);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment