Package com.sun.pdfview.pattern
Class ShaderType2
- java.lang.Object
-
- com.sun.pdfview.pattern.PDFShader
-
- com.sun.pdfview.pattern.ShaderType2
-
public class ShaderType2 extends PDFShader
A shader that performs axial shader based on a function.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ShaderType2.Type2Paint
A subclass of paint that uses this shader to generate a paint(package private) class
ShaderType2.Type2PaintContext
A simple paint context that uses an existing raster in device space to generate pixels
-
Field Summary
Fields Modifier and Type Field Description private java.awt.geom.Point2D
axisEnd
the end of the axisprivate java.awt.geom.Point2D
axisStart
the start of the axisprivate boolean
extendEnd
whether to extend the end of the axisprivate boolean
extendStart
whether to extend the start of the axisprivate PDFFunction[]
functions
functions, as an array of either 1 or n functionsprivate float
maxT
the domain maximumprivate float
minT
the domain minimum-
Fields inherited from class com.sun.pdfview.pattern.PDFShader
AXIAL_SHADING, COONS_PATCH_MESH_SHADING, FREE_FORM_SHADING, FUNCTION_SHADING, LATTICE_SHADING, RADIAL_SHADING, TENSOR_PRODUCTS_MESH_SHADING
-
-
Constructor Summary
Constructors Constructor Description ShaderType2()
Creates a new instance of ShaderType2
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Point2D
getAxisEnd()
Get the end of the axisjava.awt.geom.Point2D
getAxisStart()
Get the start of the axisboolean
getExtendEnd()
Get whether to extend the end of the axisboolean
getExtendStart()
Get whether to extend the start of the axisPDFFunction[]
getFunctions()
Get the functions associated with this shaderfloat
getMaxT()
Get the domain maximumfloat
getMinT()
Get the domain minimumPDFPaint
getPaint()
Create a paint that paints this patternvoid
parse(PDFObject shaderObj)
Parse the shader-specific dataprotected void
setAxisEnd(java.awt.geom.Point2D axisEnd)
Set the start of the axisprotected void
setAxisStart(java.awt.geom.Point2D axisStart)
Set the start of the axisprotected void
setExtendEnd(boolean extendEnd)
Set whether to extend the end of the axisprotected void
setExtendStart(boolean extendStart)
Set whether to extend the start of the axisprotected void
setFunctions(PDFFunction[] functions)
Set the functions associated with this shaderprotected void
setMaxT(float maxT)
Set the domain maximumprotected void
setMinT(float minT)
Set the domain minimum-
Methods inherited from class com.sun.pdfview.pattern.PDFShader
getBackground, getBBox, getColorSpace, getShader, getType, setBackground, setBBox, setColorSpace
-
-
-
-
Field Detail
-
axisStart
private java.awt.geom.Point2D axisStart
the start of the axis
-
axisEnd
private java.awt.geom.Point2D axisEnd
the end of the axis
-
minT
private float minT
the domain minimum
-
maxT
private float maxT
the domain maximum
-
extendStart
private boolean extendStart
whether to extend the start of the axis
-
extendEnd
private boolean extendEnd
whether to extend the end of the axis
-
functions
private PDFFunction[] functions
functions, as an array of either 1 or n functions
-
-
Method Detail
-
parse
public void parse(PDFObject shaderObj) throws java.io.IOException
Parse the shader-specific data
-
getPaint
public PDFPaint getPaint()
Create a paint that paints this pattern
-
getAxisStart
public java.awt.geom.Point2D getAxisStart()
Get the start of the axis
-
setAxisStart
protected void setAxisStart(java.awt.geom.Point2D axisStart)
Set the start of the axis
-
getAxisEnd
public java.awt.geom.Point2D getAxisEnd()
Get the end of the axis
-
setAxisEnd
protected void setAxisEnd(java.awt.geom.Point2D axisEnd)
Set the start of the axis
-
getMinT
public float getMinT()
Get the domain minimum
-
setMinT
protected void setMinT(float minT)
Set the domain minimum
-
getMaxT
public float getMaxT()
Get the domain maximum
-
setMaxT
protected void setMaxT(float maxT)
Set the domain maximum
-
getExtendStart
public boolean getExtendStart()
Get whether to extend the start of the axis
-
setExtendStart
protected void setExtendStart(boolean extendStart)
Set whether to extend the start of the axis
-
getExtendEnd
public boolean getExtendEnd()
Get whether to extend the end of the axis
-
setExtendEnd
protected void setExtendEnd(boolean extendEnd)
Set whether to extend the end of the axis
-
getFunctions
public PDFFunction[] getFunctions()
Get the functions associated with this shader
-
setFunctions
protected void setFunctions(PDFFunction[] functions)
Set the functions associated with this shader
-
-