Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Obtaining the CGContextRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining the CGContextRef



On Oct 12, 2006, at 10:53 AM, David Knuth wrote:

Currently, I am stalled on how to obtain the CGContextRef associated with an HIView.  The HIView will contain all the Quartz drawing my app will do and is updated at 10 Hz from an EventTimer which sends a kEventControlDraw to the HIView to have it draw itself.  This is done by my app creating the event, sending it, and having a handler catch it and pull out of the event the CGContextRef.  Since no where in my code to I explicitly create or obtain the CGContextRef associated with the HIView, I don't know how to obtain it and add it as a parameter to the Draw event.  The kEventControlDraw that is sent due to window resizing, etc., automatically provides the context as a parameter to the event.

Don't create an event, call HIViewSetNeedsDispaly(theHIView, true) in your timer. The OS will handle the rest.

--

Reality is what, when you stop believing in it, doesn't go away.

Failure is not an option. It is a privilege reserved for those who try.


David Duncan


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Obtaining the CGContextRef (From: David Knuth <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.