• 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: white screen windows at first
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: white screen windows at first


  • Subject: Re: white screen windows at first
  • From: Bill Appleton <email@hidden>
  • Date: Wed, 28 Apr 2010 11:29:36 -0700

hi all,

i have been working on this a lot & have some new information

previously i was using carbon and core graphics

when i draw to the screen, sometimes it is in the update event but sometimes
it was in response to a mouse click, or some other event

this always worked:

*
QDBeginCGContext(grafptr, &cgContext);
CGContextSaveGState(cgContext);

draw with core graphics here...

CGContextRestoreGState(cgContext);
QDEndCGContext(grafptr, &cgContext);*


but when i switched to cocoa, i started doing this:


*cgcontext = [[myNSWindowPtr graphicsContext] graphicsPort];*
*CGContextSaveGState(cgContext);*

*draw with core graphics here...

CGContextRestoreGState(cgContext);


*this appears to only work from inside the drawRect routine, if i get here
from some other event it doesn't work

so is it "legal" to draw on an NSWindow from some other event?

if not, what the heck does QDEndCGContext do that makes it work?



thanks,

bill



*

*









On Wed, Apr 28, 2010 at 2:51 AM, vincent habchi <email@hidden> wrote:

> Le 28 avr. 2010 à 10:10, Paul Sanders a écrit :
>
> >> this problem must be because i am using core graphics
>
> There is no problem using Core Graphics, especially if your NSView is
> backed by a CALayer. I do that routinely on the small GIS I try to develop.
>
> Vincent
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

  • Follow-Ups:
    • Re: white screen windows at first
      • From: vincent habchi <email@hidden>
    • Re: white screen windows at first
      • From: Graham Cox <email@hidden>
    • Re: white screen windows at first
      • From: Shawn Erickson <email@hidden>
    • Re: white screen windows at first
      • From: "Paul Sanders" <email@hidden>
    • Re: white screen windows at first
      • From: Bill Appleton <email@hidden>
References: 
 >white screen windows at first (From: Bill Appleton <email@hidden>)
 >Re: white screen windows at first (From: "Paul Sanders" <email@hidden>)
 >Re: white screen windows at first (From: Bill Appleton <email@hidden>)
 >Re: white screen windows at first (From: Uli Kusterer <email@hidden>)
 >Re: white screen windows at first (From: Bill Appleton <email@hidden>)
 >Re: white screen windows at first (From: "Paul Sanders" <email@hidden>)
 >Re: white screen windows at first (From: vincent habchi <email@hidden>)

  • Prev by Date: Re: NSCalendar date calculation anomaly
  • Next by Date: Getting filename in NSDocument readFromData
  • Previous by thread: Re: white screen windows at first
  • Next by thread: Re: white screen windows at first
  • Index(es):
    • Date
    • Thread