scenic
Class Gradient

java.lang.Object
  extended by scenic.SceneNode
      extended by scenic.SceneLeaf
          extended by scenic.Brush
              extended by scenic.Gradient

public class Gradient
extends Brush

This brush paints a gradient.


Field Summary
static int CONICAL
           
static int LINEAR
           
static int RADIAL
           
static int SQUARE
           
 
Constructor Summary
Gradient()
          Constructs a gradient.
 
Method Summary
 ColorFunction getFunction()
          Gets the color function.
 java.awt.geom.AffineTransform getTransform()
          Gets the transformation of the pattern.
 int getType()
          Gets the type of the gradient.
 void setFunction(ColorFunction function)
          Sets the color function.
 void setTransform(java.awt.geom.AffineTransform transform)
          Sets the transformation of the pattern.
 void setType(int type)
          Sets the type of the gradient.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINEAR

public static final int LINEAR
See Also:
Constant Field Values

RADIAL

public static final int RADIAL
See Also:
Constant Field Values

SQUARE

public static final int SQUARE
See Also:
Constant Field Values

CONICAL

public static final int CONICAL
See Also:
Constant Field Values
Constructor Detail

Gradient

public Gradient()
Constructs a gradient.

Method Detail

getType

public int getType()
Gets the type of the gradient.


setType

public void setType(int type)
Sets the type of the gradient. The type must be either LINEAR, SQUARE, RADIAL or CONICAL.


getFunction

public ColorFunction getFunction()
Gets the color function.


setFunction

public void setFunction(ColorFunction function)
Sets the color function. The color function determines the color slide of the gradient.


getTransform

public java.awt.geom.AffineTransform getTransform()
Gets the transformation of the pattern.


setTransform

public void setTransform(java.awt.geom.AffineTransform transform)
Sets the transformation of the pattern. The transformation is used to transform the gradient. The transformation is typically used to scale and rotate the gradient.