[futurebasic] Re: [FB] Character with stroke

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2017 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Mon, 24 Apr 2017 10:13:07 -0700
Ken writes a nice demo but these two calls tie the code to Quickdraw and 32-bitness. Ken did this for good reason but by copying code without understanding the underlying assumptions an FBer can find themselves tied to old code.

fn QDBeginCGContext( window( _wndPort ), @ctx )
fn QDEndCGContext(  window( _wndPort ), @ctx )

Also, don't forget the restriction to the above: "Between QDBeginCGContext and QDEndCGContext, Quickdraw drawing is disabled; only CoreGraphics drawing is allowed"

AFAIK, this is unnecessary:  CGContextRelease( ctx ) because "QDEndCGContext releases the CGContext returned from QDBeginCGContext and sets it to NULL"