[cairo] Layered stroke / fill

Lockert Fredrick lockert.fredrick at gmail.com
Sun Aug 19 06:02:53 PDT 2012


On 19 August 2012 20:56, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Just stroke and fill each rectangle individually. Adding all rectangles
> to the path then calling stroke/fill operates on the union of that path.
> So,
>   foreach (rect) {
>     cr->rectangle(*rect)
>     cr->set_source_rgb(*stroke_color)
>     cr->stroke_preserve()
>     cr->set_source_rgb(*fill_color)
>     cr->fill()
>   }

Thanks a lot mate! That gave the desired effect I was looking for.

Cheers,
Fredrick


More information about the cairo mailing list