- java.lang.Object
-
- org.jfree.pdf.internal.PDFObject
-
- org.jfree.pdf.shading.Shading
-
- org.jfree.pdf.shading.RadialShading
-
public final class RadialShading extends Shading
A radial shading.
-
-
Field Summary
Fields Modifier and Type Field Description private double[]
coords
Coordinates (x0, y0, r0, x1, y1, r1).private double[]
domain
The domain.private boolean[]
extend
The extend flags (two of them).private Function
function
The shading function.-
Fields inherited from class org.jfree.pdf.shading.Shading
dictionary
-
-
Constructor Summary
Constructors Constructor Description RadialShading(int number, double[] coords, Function function)
Creates a new radial shading instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getCoords()
Returns a copy of the axis coordinates array(x1, y1, x2, y2)
.double[]
getDomain()
Returns the function domain.boolean[]
getExtend()
Returns the extend array.Function
getFunction()
Returns the function for this shading.void
setCoords(double[] coords)
Sets the array containing the coordinates(x1, y1, r1, x2, y2, r2)
of the starting circle and the ending circle.void
setDomain(double[] domain)
Sets the domain.void
setExtend(boolean[] extend)
Sets the extend array.void
setFunction(Function function)
Sets the function for this shading.-
Methods inherited from class org.jfree.pdf.shading.Shading
getObjectBytes, getShadingType
-
Methods inherited from class org.jfree.pdf.internal.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
-
-
-
Field Detail
-
coords
private double[] coords
Coordinates (x0, y0, r0, x1, y1, r1).
-
function
private Function function
The shading function.
-
domain
private double[] domain
The domain.
-
extend
private boolean[] extend
The extend flags (two of them).
-
-
Constructor Detail
-
RadialShading
public RadialShading(int number, double[] coords, Function function)
Creates a new radial shading instance.- Parameters:
number
- the PDF object number.coords
- the coordinates(x1, y1, r1, x2, y2, r2)
.function
- the interpolation function (null
not permitted).
-
-
Method Detail
-
getCoords
public double[] getCoords()
Returns a copy of the axis coordinates array(x1, y1, x2, y2)
.- Returns:
- A copy of the axis coordinates array (never
null
).
-
setCoords
public void setCoords(double[] coords)
Sets the array containing the coordinates(x1, y1, r1, x2, y2, r2)
of the starting circle and the ending circle.- Parameters:
coords
- the circle coordinates (null
not permitted).
-
getFunction
public Function getFunction()
Returns the function for this shading.- Returns:
- The function (never
null
).
-
setFunction
public void setFunction(Function function)
Sets the function for this shading.- Parameters:
function
- the function (null
not permitted).
-
getDomain
public double[] getDomain()
Returns the function domain. The default value is[0.0, 1.0]
.- Returns:
- The function domain.
-
setDomain
public void setDomain(double[] domain)
Sets the domain.- Parameters:
domain
- the domain (array must have length 2).
-
getExtend
public boolean[] getExtend()
Returns the extend array.- Returns:
- The extend array.
-
setExtend
public void setExtend(boolean[] extend)
Sets the extend array.- Parameters:
extend
- the extend array (must have length 2).
-
-