[cairo] Polygon fill styles?
Ian Britten
britten at caris.com
Mon Aug 25 09:50:59 PDT 2008
> Jonathon Jongsma wrote:
>>
>> mask() will actually paint the source to the masked region, so you
>> should make sure to set the source *before* masking(). This also means
>> that you shouldn't need the fill.
>
> Irregardless, your suggested changes don't seem to work for me.
> In fact, now I seem to get no output - Just a white page (Although
> the PDF file is non-empty).
Hmmm... It looks like this is actually working. It seems that a
couple of the PDF viewers I've been using (gv, kpdf) don't render
mask data correctly (At all!). One called 'evince' seems to show
it correctly though.
Can anyone recommend a good PDF viewer that I can have confidence
in? (Ideally, a viewer on Linux and one for Windows - They don't
have to be the same...) I hate wasting peoples time just because
of a viewer...
Now that I see the mask result, it appears that it does not actually
use the path I had previously set into my PDF context (ie: The
polygon I wanted filled), and has actually filled the entire
surface with the mask. I'm gathering that this is the expected
behaviour (Just not what I'm looking for).
In the end, after all this "pattern vs mask" experimentation, I
think I understand what's going on a lot better. Many thanks to
everyone for their patient help! It looks like I'll probably
be talking the 'pattern' approach, since it clips to my polygon
boundary. Because it has the colour in it though, it means I
can't easily cache/reuse the pattern, and will probably need to
regenerate it for every polygon. Hopefully that's not too
expensive...
Again, many thanks for all the help/suggestions to date!
Ian
More information about the cairo
mailing list