java.lang.Object
org.jfree.pdf.internal.PDFObject
org.jfree.pdf.shading.Shading
org.jfree.pdf.shading.AxialShading
An axial shading.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double[]
Coordinates (x0, y0, x1, y1) defining the axis.private double[]
The domain.private boolean[]
The extend flags (two of them).private Function
The shading function.Fields inherited from class org.jfree.pdf.shading.Shading
dictionary
-
Constructor Summary
ConstructorsConstructorDescriptionAxialShading
(int number, double[] coords, Function function) Creates a new axial shading. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Returns a copy of the axis coordinates array(x1, y1, x2, y2)
.double[]
Returns the function domain.boolean[]
Returns the extend array.Returns the function for this shading.void
setCoords
(double[] coords) Sets the axis coordinates array(x1, y1, x2, y2)
.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 Details
-
coords
private double[] coordsCoordinates (x0, y0, x1, y1) defining the axis. -
function
The shading function. -
domain
private double[] domainThe domain. -
extend
private boolean[] extendThe extend flags (two of them).
-
-
Constructor Details
-
AxialShading
Creates a new axial shading.- Parameters:
number
- the object number.coords
- the coordinates of the axis (x1, y1, x2, y2).function
- the function object for the shading (null
not permitted).
-
-
Method Details
-
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 axis coordinates array(x1, y1, x2, y2)
.- Parameters:
coords
- the axis coordinates (null
not permitted).
-
getFunction
Returns the function for this shading.- Returns:
- The function (never
null
).
-
setFunction
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).
-