org.freedesktop.cairo
Class Pattern

java.lang.Object
  extended byorg.gnu.glib.Struct
      extended byorg.freedesktop.cairo.CairoObject
          extended byorg.freedesktop.cairo.Pattern
Direct Known Subclasses:
Gradient, SurfacePattern

public class Pattern
extends org.freedesktop.cairo.CairoObject

TODO: error handling


Constructor Summary
Pattern(double red, double green, double blue)
          Create a new cairo_pattern_t corresponding to a opaque color.
Pattern(double red, double green, double blue, double alpha)
          Create a new cairo_pattern_t corresponding to a translucent color.
 
Method Summary
 Matrix getMatrix()
          Returns the current transform matrix of this pattern.
 void setMatrix(Matrix matrix)
          Sets the transformation matrix for this pattern.
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern(double red,
               double green,
               double blue)
Create a new cairo_pattern_t corresponding to a opaque color. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.

Parameters:
red -
green -
blue -

Pattern

public Pattern(double red,
               double green,
               double blue,
               double alpha)
Create a new cairo_pattern_t corresponding to a translucent color. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.

Parameters:
red -
green -
blue -
alpha -
Method Detail

setMatrix

public void setMatrix(Matrix matrix)
Sets the transformation matrix for this pattern.

Parameters:
matrix - The transformation matrix.

getMatrix

public Matrix getMatrix()
Returns the current transform matrix of this pattern. Note that this method returns a new matrix object and you must dispose it.

Returns:
The transformation matrix for the pattern.