[cairo] Getting Colour from linear gradient
gurnett at glocalnet.net
Wed Sep 3 04:50:10 PDT 2008
Is there anyway of determining the colour at a given position from a linear gradiant. Say for example I have
pat = cairo_pattern_create_linear (0.0, 0, Width, 0);
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 0, 0, 1);
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
I would like to just question cairo the colour value at a given position with something like
The reason I'm asking this is that I'm currently using linear gradients on strokes (a non closed arc), and I would like to create the linear gradient and then remap it to the path of the arc by creating smaller gradients based on the tangents of the curvature.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo