Re: Why does this code not create a colored dot?
Re: Why does this code not create a colored dot?
- Subject: Re: Why does this code not create a colored dot?
- From: "I. Savant" <email@hidden>
- Date: Tue, 4 Apr 2006 09:14:12 -0400
You need to give this document a thorough read:
http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaDrawingGuide/index.html
--
I.S.
On Apr 4, 2006, at 9:08 AM, desktoast music productions wrote:
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:
40gmail.com
This email sent to email@hidden
_______________________________________________
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