• 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
Re: lockFocus clearing current color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lockFocus clearing current color


  • Subject: Re: lockFocus clearing current color
  • From: Ian was here <email@hidden>
  • Date: Sat, 16 Apr 2005 09:57:11 -0700 (PDT)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

After locking focus onto another view/image, you may
need to set the color again, otherwise it will default
to black.



--- Jonathon Mah <email@hidden> wrote:
> Hi,
>
> This feels like it should have a simple answer, but
> I've searched and
> can't find anything. I'm trying to draw an
> NSBezierPath into an NSImage
> with the current color. I can break it down to this
> case:
>
> NSImage *myImage = [[NSImage alloc]
> initWithSize:[path bounds].size];
> [myImage lockFocus];
> [path fill];
> [myImage unlockFocus];
>
> The problem is that the path is filled with black
> instead of the
> current drawing color (which was set just above).
> How can I maintain
> that color when drawing into my image?
>
> (I can't put [someColor set] immediately above [path
> fill], as the
> color will be set somewhere, then this method will
> be called.)
>
> Thanks,
>
>
> Jonathon Mah
> 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
>



__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide
 _______________________________________________
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: lockFocus clearing current color
      • From: Jonathon Mah <email@hidden>
  • Prev by Date: Re: Short Date Format for NSCalendarDate in bound NSTableColumn
  • Next by Date: Re: lockFocus clearing current color
  • Previous by thread: lockFocus clearing current color
  • Next by thread: Re: lockFocus clearing current color
  • Index(es):
    • Date
    • Thread