stroke and fill - logs CGContextSetFillColorWithColor invalid context
stroke and fill - logs CGContextSetFillColorWithColor invalid context
- Subject: stroke and fill - logs CGContextSetFillColorWithColor invalid context
- From: Richard Salvatierra <email@hidden>
- Date: Tue, 10 Apr 2007 17:11:26 -0400
I am drawing a color swatch for a popupmenu but noticed in the
console the following log:
CGContextSetFillColorWithColor invalid context
CGContextSetStrokeColorWithColor: invalid context
What am I doing incorrectly?
while (nil != (color = [enumerator nextObject]))
{
subitem = [colorMenu addItemWithTitle:color action:@selector
(setColorTag:) keyEquivalent:@""];
NSRect rect = NSMakeRect(0,0,16,16);
NSImage *colorImage = [[NSImage alloc] initWithSize: rect.size];
[colorImage lockFocus];
[(NSColor*) [colorList colorWithKey: color] drawSwatchInRect:
NSInsetRect (rect, 2.0, 2.0)];
[colorImage unlockFocus];
[subitem setImage: colorImage];
[colorImage release];
}
-Rich
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden