[futurebasic] Re: [FB] CG Context Question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2011 : Group Archive : Group : All Groups

From: Max Taylor <maxclass@...>
Date: Sat, 29 Jan 2011 15:48:02 -0800
On Jan 29, 2011, at 15:02 PM, Robert Purves wrote:

And other things...

>> Any thoughts or ideas on how any of you have used them in an application?
> 
> [1] Drawing to a control (a.k.a HIView) in an event handler. The CGContextRef is made available as a parameter of the event.
> 
> case _kEventControlDraw
>  dim as CGContextRef  ctx
>  fn GetEventParameter( theEvent, _kEventParamCGContextRef, _typeCGContextRef, #0, sizeof( CGContextRef ), #0, @ctx )
>  .. your drawing code here
> 
> [2] Drawing directly to a window   QDBeginCGContext(); deprecated.
> 
> Contexts that you explicitly create:
> [3] Drawing to a bitmap   CGBitmapContextCreate()
> [4] CGPDFContextCreate()
> [5] HIWindowCreateCollapsedDockTileContext()
> [6] HIApplicationCreateDockTileContext()

Thanks for your perspective. Did not know about the _kEventControlDraw case in an event handler.

These are still Carbon events though, aren't they? That's the main thing we are trying to skirt around if possible. I am looking to use as little CE stuff as we can get along with and still keep our app's running.

Max Taylor
The MaxClass Guy