org.freedesktop.cairo

Class Pattern

public class Pattern extends 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
protected static voidcairo_pattern_add_color_stop_rgb(Handle pat, double offset, double red, double green, double blue)
protected static voidcairo_pattern_add_color_stop_rgba(Handle pat, double offset, double red, double green, double blue, double alpha)
protected static Handlecairo_pattern_create_for_surface(Handle surface)
protected static Handlecairo_pattern_create_linear(double x0, double y0, double x1, double y1)
protected static Handlecairo_pattern_create_radial(double cx0, double yx0, double radius0, double cx1, double cy1, double radius1)
protected static intcairo_pattern_get_extend(Handle pat)
protected static intcairo_pattern_get_filter(Handle pat)
protected static voidcairo_pattern_set_extend(Handle pat, int extend)
protected static voidcairo_pattern_set_filter(Handle pat, int filter)
protected voidfinalize()
MatrixgetMatrix()
Returns the current transform matrix of this pattern.
voidsetMatrix(Matrix matrix)
Sets the transformation matrix for this pattern.

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

cairo_pattern_add_color_stop_rgb

protected static final void cairo_pattern_add_color_stop_rgb(Handle pat, double offset, double red, double green, double blue)

cairo_pattern_add_color_stop_rgba

protected static final void cairo_pattern_add_color_stop_rgba(Handle pat, double offset, double red, double green, double blue, double alpha)

cairo_pattern_create_for_surface

protected static final Handle cairo_pattern_create_for_surface(Handle surface)

cairo_pattern_create_linear

protected static final Handle cairo_pattern_create_linear(double x0, double y0, double x1, double y1)

cairo_pattern_create_radial

protected static final Handle cairo_pattern_create_radial(double cx0, double yx0, double radius0, double cx1, double cy1, double radius1)

cairo_pattern_get_extend

protected static final int cairo_pattern_get_extend(Handle pat)

cairo_pattern_get_filter

protected static final int cairo_pattern_get_filter(Handle pat)

cairo_pattern_set_extend

protected static final void cairo_pattern_set_extend(Handle pat, int extend)

cairo_pattern_set_filter

protected static final void cairo_pattern_set_filter(Handle pat, int filter)

finalize

protected void finalize()

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.

setMatrix

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

Parameters: matrix The transformation matrix.