[cairo] polygon fill with patterns

Travis Griggs tgriggs at cincom.com
Tue Feb 24 07:14:10 PST 2009


On Feb 24, 2009, at 12:37 AM, Stephan Siemen wrote:

> Hi,
>
> I try to fill polygons (e.g. paths) with patterns of dots. I
> have various areas with different properties where I want the
> dot size, color and distance between dots reflect the properties.
> I generate geographical maps of weather properties.
>
> Since I have many areas (of very different sizes and shapes)
> I am very much concerned about performance. What is the best
> way to achieve this? Should I generate a (png) image and use
> this as pattern? Or can I draw a pattern and use this? Latter
> would be ideal because I could implement easily more patterns.
>
> I looked at the examples and the only one I could get to work
> is to use images for patterns.
>
> Thanks in advance for any help!

Make it work. Make it right. Make it fast.

I'd go with your latter solution until you have issues with it.

--
Travis Griggs
Objologist
"Dying men never wish they'd spent more time at the office"




More information about the cairo mailing list