[cairo] Pattern rendering questions
Ian Britten
britten at caris.com
Thu Aug 21 06:36:02 PDT 2008
Hi all,
I hope I'm not overwhelming this list with questions, but I've got
some more, regarding my "Polygon fill styles?" work. For now, I've
ignored my outstanding questions, roughed in a basic implementation,
and attached some preliminary results.
[ I hope small attachments are acceptable on this list ]
Each of these was generated using the approach described by Kalle
Vahlman yesterday. I didn't include my code, as the basic mechanics
seem to be working. I think my questions are more general rendering
questions, and not necessarily specific to my attempt at fill styles.
In the first one (diagonal.png):
I generate a small surface (w, h), stroke a line to it (0,0), (w,h),
make the pattern, CAIRO_EXTEND_REPEAT, etc, etc.
- Note the missing pixels, presumably from where the tiles are
assembled after the pattern is clipped to the extent of the
surface.
-> Can anyone suggest any technique which might fill in these
missing pixels?
In the second one (cross.png)
As with the previous pattern, I generate this one by drawing an X
from (0,0), (w,h), etc, but at 50% alpha.
- Note the darker pixels, presumably from where the pattern
overlaps, and the alphas of the individual strokes is combined.
(Or, maybe it's from where the tiles overlap. I'm not sure...)
-> Can anyone suggest a technique that would result in a
consistent alpha for the entire pattern?
In both of these cases, I'm pretty sure I understand what is
happening, and the result is arguably correct. It's just not
quite what I want... :(
Thanks for any help/suggestions!
Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diagonal.png
Type: image/png
Size: 1006 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080821/8c4ca377/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross.png
Type: image/png
Size: 1384 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080821/8c4ca377/attachment-0003.png
More information about the cairo
mailing list