[cairo] How to texturing a self-defined pattern(or image) along line and fill a polygon?

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Fri Dec 4 11:56:53 PST 2015


On Fri, 04 Dec 2015 14:53:56 +0800, quanzhao198757 at sina.com wrote:

> I want to use cairo to draw vector-maps, and it shows the strong
> ability to draw lines and polygons etc., but now I need to texturing
> a self-defined pattern(may like -^--^--^--^-) along a winding line
> and fill polygon with it, how should I do?

You could flatten the path to a sequence of straight lines. Then do
your own patterning along each of those straight lines.


More information about the cairo mailing list