Why does this code not create a colored dot?
Why does this code not create a colored dot?
- Subject: Why does this code not create a colored dot?
- From: desktoast music productions <email@hidden>
- Date: Tue, 04 Apr 2006 15:08:34 +0200
I tried to resolve my problem like that:
- (NSImage *)createImageWithColor:(NSColor *)color {
NSRect frame = NSMakeRect(0, 0, 11, 11);
NSView *imageView = [[NSView alloc] initWithFrame:frame];
NSBezierPath *path = [NSBezierPath bezierPathWithOvalInRect:frame];
[color set]; //???
[path fill];
NSData *imageData = [imageView dataWithPDFInsideRect:frame];
NSImage *resultImage = [[NSImage alloc] initWithData:imageData];
return resultImage;
}
Why does this code not return a colored dot? Can it? What am I doing wrong?
Best regards,
Peter
--
peter schwaiger
desktoast music productions
http://www.autlawmusic.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden