<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Is there anyway of determining the colour at a
given position from a linear gradiant. Say for example I have</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>pat = cairo_pattern_create_linear (0.0, 0,
Width, 0);<BR>cairo_pattern_add_color_stop_rgba (pat, 0, 1, 0, 0,
1);<BR>cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would like to just question cairo the colour
value at a given position with something like</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>cairo_pattern_get_color_from_gradient(pat,0.5);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Mick</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>