[cairo] polygon fill with patterns
Gerdus van Zyl
gerdusvanzyl at gmail.com
Wed Feb 25 07:18:36 PST 2009
You need to make the image into a pattern
(cairo_pattern_create_for_surface) then set the extend using
cairo_pattern_set_extend(pattern,CAIRO_EXTEND_REPEAT). You can of
course also make a pattern from any surface, so a generated pattern is
On Wed, Feb 25, 2009 at 4:38 PM, cu <cairouser at yahoo.com> wrote:
> I'll second this question. I am sure I must have missed something, but
> the only way I found to fill polygons with image so far was to create a
> single image large enough to cover the envelope of polygon entirely, and
> then draw with it.
> Is there a way to draw with a smaller image that will be used as a fill
> repeatedly, as a pattern?
> Travis Griggs wrote:
>>> 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
>> "Dying men never wish they'd spent more time at the office"
>> cairo mailing list
>> cairo at cairographics.org
> cairo mailing list
> cairo at cairographics.org
More information about the cairo