[cairo] Is Cairo able to fit my needs?

Baz brian.ewins at gmail.com
Thu Oct 4 08:02:31 PDT 2007


On 04/10/2007, Jürgen <info at innova-studios.com> wrote:
> Hi there carl,
>
> when cairo doesnt have bitwise logical operators, how is cairo then able
> to display postscript images? i have several postscript images on my
> harddisk that use chained objects. that means you have e.g. a black square
> and inside of it another smaller black square. when you chain them it
> looks like a white square in a black square. (i can draw you an image to
> make it visible to you if you want me to)
>
> kind regards juergen

By 'chained objects' do you mean 'paths'?  Postscript doesn't let you
take arbitrary objects and composite them using bitwise operators - it
uses the 'painter model' where each object is simply layered on top of
previous objects with opaque paint.

However, the eofill operator in postscript can be used to get the
effect you described there, if those are two square sub-paths. I'm
guessing that's what those postscript files are doing - and Cairo can
do that too:
http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-fill-rule

Cheers,
Baz


More information about the cairo mailing list