[cairo] Clipping and filling

Donn donn.ingle at gmail.com
Fri Nov 30 05:08:50 PST 2007


Hello again all,
 I don't know if this is possible, but:
 I have a function that performs clipping and it relies on code being run that 
does not perform a stroke ( ) or a fill ( ) (like code B example below). I am 
wondering if it's possible to turn a block of code that *includes* a fill ( ) 
*into* a result that is as if no fill ( ) were performed? 

i.e. code A should be functionally equivalent to code B : such that after code 
A runs I can use the result in-between code like this:

self.context.save ( )
self.context.clip ( )
codeA.draw()
self.restore ( )


code A

cr.<something smart>
cr.rectangle ( ... )
cr.<other cairo drawing stuff>
cr.set_source_rgb ( ... )
cr.fill ( )
cr.<something smart>
<result at this point is the same as code B>


code B

cr.rectangle ( ... )
cr.<other cairo drawing stuff>
# no fill or stroke

\d
-- 
A sophisticated rhetorician, inebriated with the exuberance of his own 
verbosity. -- Benjamin Disraeli



More information about the cairo mailing list