java-gnome version 4.0.19

org.freedesktop.cairo
Class Pattern

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.freedesktop.cairo.Pattern
Direct Known Subclasses:
LinearPattern, RadialPattern, SolidPattern, SurfacePattern

public abstract class Pattern
extends org.freedesktop.bindings.Proxy

A Pattern source.

Since:
4.0.7
Author:
Andrew Cowie

Method Summary
 void addColorStopRGB(double offset, double red, double green, double blue)
          Add a colour stop to a Pattern gradient.
 void addColorStopRGBA(double offset, double red, double green, double blue, double alpha)
          Add a colour stop to a Pattern gradient.
 Surface getSurface()
          Get the Surface backing this Pattern.
 void setExtend(Extend extend)
          Specify the strategy to be used when drawing the pattern outside of the area implicit in the how the Pattern itself is described.
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addColorStopRGB

public void addColorStopRGB(double offset,
                            double red,
                            double green,
                            double blue)
Add a colour stop to a Pattern gradient. Equivalent to calling:
 addColorStopRGBA(offset, red, green, blue, 1.0);
 
See addColorStopRGBA() for documentation of the offset parameter. The colour parameters are the same as for setSource().

Since:
4.0.7

addColorStopRGBA

public void addColorStopRGBA(double offset,
                             double red,
                             double green,
                             double blue,
                             double alpha)
Add a colour stop to a Pattern gradient.

The offset parameter provides for the ordering of stops. When a Pattern applies its colour stops, it works through them in the order specified. If two stops are specified with identical offset values, they will be sorted according to the order in which the stops are added, is used for making sharp color transitions instead of a blend.

Colour stops handle colour arguments the same way as setSource() does.

Since:
4.0.7

getSurface

public Surface getSurface()
Get the Surface backing this Pattern. Obviously this only works with SurfacePatterns.

Since:
4.0.18

setExtend

public void setExtend(Extend extend)
Specify the strategy to be used when drawing the pattern outside of the area implicit in the how the Pattern itself is described.

If you're looking at this, it's probably because you're wondering why your Pattern isn't extending. Call this with REPEAT.

Since:
4.0.17


java-gnome