[cairo] can cairo give me a draw pen with gradient width

Dirk Schönberger dirk.schoenberger at sz-online.de
Mon Dec 10 22:07:49 PST 2007


> Hi, I'm sure others will give you better advice, but Cairo is all about
> drawing *outlines* (paths) of things. So your character would be drawn the
> way you would do it in a vector application; by joining nodes around the
> outline of the shape, and then on the inside and then filling it.
>
> I don't think one can vary the size of the stroke *while* it's stroking,
> but I
> could be wrong.
>

In theory it is possible, but I don't think it is possible in cairo yet.
What you need would be a means of path transformation / stroke converter.
Cairo just provides an implicit stroke converter. Other rendering
libraries (Anti-Grain Geometry / AGG springs to mind) allow for switchable
path conversion strategies.

A path converter would be a method / function / callback whatever, which
has a vector path as input and returns a vector path. It should run on
untransformed vector data.

Regards
Dirk


More information about the cairo mailing list