org.freedesktop.cairo
Class LinearPattern
Object
org.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.freedesktop.cairo.Pattern
org.freedesktop.cairo.LinearPattern
public class LinearPattern
- extends Pattern
A linear gradient.
Before using the LinearPattern you need to call
addColorStopRGBA()
a few times to set up the gradient. For example:
pat = new LinearPattern(40, 25, 120, 100);
pat.addColorStopRGB(0.0, 0.0, 0.3, 0.8);
pat.addColorStopRGB(1.0, 0.0, 0.8, 0.3);
and then you can get on with using the Pattern in drawing operations.
cr.setSource(pat);
- Since:
- 4.0.7
- Author:
- Andrew Cowie
Constructor Summary |
LinearPattern(double x0,
double y0,
double x1,
double y1)
Create a Pattern with a linear gradient between co-ordinates
x0 ,y0 and x1 ,y1 . |
Methods inherited from class org.freedesktop.bindings.Pointer |
toString |
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LinearPattern
public LinearPattern(double x0,
double y0,
double x1,
double y1)
- Create a Pattern with a linear gradient between co-ordinates
x0
,y0
and x1
,y1
.
- Since:
- 4.0.7