[cairo] Drawing a thick path sans stroke()

Carl Worth cworth at cworth.org
Fri Feb 19 09:45:48 PST 2010


On Fri, 12 Feb 2010 10:35:18 +0200, donn <donn.ingle at gmail.com> wrote:
> I want to draw paths (curves and lines) without using strokes, but I 
> want them to have a width (from 1 upwards) -- in other words, I need to 
> draw a path from A to B and then turn at right angles, draw a thickness, 
> and then draw back along the same path and close.
> 
> Call it an outline of a thick curve -- which would then be filled by 
> fill().

It sounds like what you want is to be able to take some path in cairo,
and from it compute a new path for which cairo_fill() will produce the
same result as cairo_stroke() would on the original path.

Is that it?

If so, the API we have envisioned for this operation (since long ago) is
called cairo_stroke_to_path. And you're in luck, because Jeff Muizelaar
has recently been doing implementation of exactly this function.

See Jeff's recent proposal here:

http://lists.cairographics.org/archives/cairo/2010-January/019021.html

And the continuation of the same thread here (since pipermail
obnoxiously splits all threads at arbitrary time boundaries):

http://lists.cairographics.org/archives/cairo/2010-February/019062.html

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20100219/60b2ccad/attachment.pgp 


More information about the cairo mailing list