[cairo] xor fill

Dan McMahill dan at mcmahill.net
Wed Jan 21 06:01:02 PST 2009


Dan McMahill wrote:
> Travis Griggs wrote:
>> On Jan 20, 2009, at 7:18 PM, Dan McMahill wrote:
>>
>>> is there a way to do an xor fill with cairo?  I know about  
>>> cairo_fill()
>>> and cairo_fill_preserve() but can't seem to figure out how to do an  
>>> xor
>>> fill.
>>
>> No, there is not. Having whined about it myself once upon a time, I  
>> feel obligated to pass on the news. That said, I've found that Cairo  
>> has allowed me to do graphical things in place of xor solutions that I  
>> liked way better anyway. In short, it's a bummer, because if you just  
>> want to port an older idea of portraying something, you can't, but  
>> OTOH, it's cool, because Cairo will force you to do it cooler anyway.
>>
>> It would be interesting to hear what you were hoping to use it for, we  
>> might suggest something cooler. :)
> 

> 
> It turns out that it wasn't too hard to write the cairo pstoedit driver 
> and I'm down to a small number of issues[1].  Of these, implementing an 
> XOR fill is a big one.  That is fairly key since it is a drawing model 
> that postscript uses.


well, it turns out I should have been reading my postscript manual more 
clearly...  eofill isn't exclusive-or but rather even-odd and cairo 
supports that nicely for me.  doh!


-Dan


More information about the cairo mailing list