java-gnome version 4.0.19

org.freedesktop.cairo
Class LinearPattern

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.freedesktop.cairo.Pattern
              extended by org.freedesktop.cairo.LinearPattern

public class LinearPattern
extends Pattern

A linear gradient.

Before using the LinearPattern you need to call addColorStopRGBA() a few times to set up the gradient. For example:

 pat = new LinearPattern(40, 25, 120, 100);
 pat.addColorStopRGB(0.0, 0.0, 0.3, 0.8);
 pat.addColorStopRGB(1.0, 0.0, 0.8, 0.3);
 
and then you can get on with using the Pattern in drawing operations.
 cr.setSource(pat);
 

Since:
4.0.7
Author:
Andrew Cowie

Constructor Summary
LinearPattern(double x0, double y0, double x1, double y1)
          Create a Pattern with a linear gradient between co-ordinates x0,y0 and x1,y1.
 
Method Summary
 
Methods inherited from class org.freedesktop.cairo.Pattern
addColorStopRGB, addColorStopRGBA, getSurface, setExtend
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearPattern

public LinearPattern(double x0,
                     double y0,
                     double x1,
                     double y1)
Create a Pattern with a linear gradient between co-ordinates x0,y0 and x1,y1.

Since:
4.0.7


java-gnome