java-gnome version 4.0.15

org.freedesktop.cairo
Class RadialPattern

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

public class RadialPattern
extends Pattern

A radial gradient Pattern.

After calling this and before using the RadialPattern you need to call addColorStopRGBA() a few times to set up the gradient. For example, to create an circular alpha blend:

 pattern = new RadialPattern(75, 75, 25, 75, 75, 120);
 pattern.addColorStopRGBA(0.0, 0.0, 0.0, 0.0, 0.0);
 pattern.addColorStopRGBA(1.0, 0.0, 0.0, 0.0, 1.0);
 
and then you can get on with using the Pattern in drawing operations:
 cr.mask(pattern);
 

Since:
4.0.7
Author:
Andrew Cowie

Constructor Summary
RadialPattern(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
          Create a Pattern with a radial gradient between two circles.
 
Method Summary
 
Methods inherited from class org.freedesktop.cairo.Pattern
addColorStopRGB, addColorStopRGBA
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RadialPattern

public RadialPattern(double cx0,
                     double cy0,
                     double radius0,
                     double cx1,
                     double cy1,
                     double radius1)
Create a Pattern with a radial gradient between two circles. The first circle is centered at cx0,cy0 with a radius of radius0, and the second circle is centered at cx1,cy1 with a radius of radius1 .

Quite typically, you will want a strict radial pattern from a common centre, in which case have cx1,cy1 equal to cx0,cy0.

Since:
4.0.7


java-gnome