[cairo] Linear gradients with percentage units
Carl Worth
cworth at cworth.org
Mon Feb 23 15:32:09 PST 2009
On Fri, 2009-02-20 at 14:23 -0700, Rick L. Vinyard, Jr. wrote:
> Is there any way to create a linear gradient that will render with
> percentage units into the current path?
You can't create a single cairo gradient that will automatically work
that way with any path, but you can certainly just call cairo_scale
after creating the path and before filling it in order to scale the
gradient to just the size you want.
You should be able to find code doing this within librsvg, mozilla, or
any other implementation of SVG that uses cairo, (since SVG provides
percentage-based gradients).
I hope that helps, and that you have fun with cairo!
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20090223/5ecd32c5/attachment.pgp
More information about the cairo
mailing list