Public Member Functions  
void  center (float x, float y) 
Set the center of the gradient, subtracted from the sampling point.  
void  scale (float value) 
The sampling point is divided by this value after subtracting the center.  
void  add (float p, Color col) 
Add a point to the gradient.  
void  set (float p, Color col) 
Set a previously defined point on the gradient or add it if this point has not been defined.  
Color  eval (float x, float y) 
Evaluate the gradient.  
Color  at (float t) 
Sample the gradient at a given point.  
void  radial (bit value) 
Set radial gradient mode (true) or linear gradient mode (false). 

Add a point to the gradient. Nominally p should be between 0 and 1; however, it can be outside of that range. Colors are linearly interpolated between. 

Sample the gradient at a given point. If it is outofrange, it returns the first or last sample point. Otherwise it linearly interpolates between the two nearest colors. 

Evaluate the gradient. This first applies the contortion, then subtracts the center and divides by scale. If the gradient is linear, then this calls at with the resultant y coordinate. If the gradient is radial, this calls at with the distance of x and y from (0, 0). Reimplemented from Brush. 