[cairo] polygon fill with patterns
Stephan Siemen
Stephan.Siemen at ecmwf.int
Thu Feb 26 06:02:51 PST 2009
Hi,
I had a go at the pattern fill, but I have problems getting it to work.
Does anyone spots an obvious mistake here?
--> cr_ is my cairo context
cairo_rectangle(cr_,0,0,100,100); /* Area I want to fill */
cairo_push_group(cr_);
cairo_rectangle(cr_,1,1,10,10); /* Pattern */
cairo_fill(cr_);
cairo_pattern_t *pat = cairo_pop_group(cr_);
cairo_pattern_set_extend (pat, CAIRO_EXTEND_REPEAT);
cairo_set_source(cr_, pat);
cairo_fill(cr_);
cairo_pattern_destroy(pat);
Thanks for your help!
Stephan
More information about the cairo
mailing list