[cairo] Use generated image as pattern inside cairo graphics
amish153 at hotmail.com
Mon Jan 27 12:22:40 UTC 2020
I've gone through the cairo graphics examples using patterns.
pattern = cairo_pattern_create_for_surface (image);
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
Now instead of "image" I have a surface with a sequence of :-
cairo_move_to(cr, xc, yc);
for (int i = 0; i < xc.size(); i++)
cairo_line_to(cr, xc[i], yc[i]);
How do I use this generated cairo surface and use it as input for the pattern ? It does not work if I simply use
pattern = cairo_pattern_create_for_surface (surface); where surface has the cairo_t cr that I used for the generated pattern..
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo