• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why does this code not create a colored dot?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Why does this code not create a colored dot?
      • From: "I. Savant" <email@hidden>
    • Re: Why does this code not create a colored dot?
      • From: Alexander Spohr <email@hidden>
  • Prev by Date: Re: Unwanted artifacts when using controls in NSView subclass
  • Next by Date: Re: Why does this code not create a colored dot?
  • Previous by thread: Re: Robustness of CoreData against malicious documents?
  • Next by thread: Re: Why does this code not create a colored dot?
  • Index(es):
    • Date
    • Thread