com.sun.pdfview.pattern
public abstract class PDFShader extends Object
A PDFShader fills a given region with a shading, such as a gradient.
Shading Dictionaries (section 4.6)
A shading dictionary specifies details of a particular gradient fill,
including the type of shading to be used, the geometry of the area to
be shaded, and the geometry of the gradient fill. Various shading types
are available, depending on the value of the dictionaryb s ShadingType entry:
Field Summary | |
---|---|
static int | AXIAL_SHADING |
static int | COONS_PATCH_MESH_SHADING |
static int | FREE_FORM_SHADING |
static int | FUNCTION_SHADING |
static int | LATTICE_SHADING |
static int | RADIAL_SHADING |
static int | TENSOR_PRODUCTS_MESH_SHADING |
Constructor Summary | |
---|---|
protected | PDFShader(int type) Creates a new instance of PDFShader |
Method Summary | |
---|---|
PDFPaint | getBackground()
Get the background color |
Rectangle2D | getBBox()
Get the bounding box |
PDFColorSpace | getColorSpace()
Get the color space |
abstract PDFPaint | getPaint()
Returns paint that represents the selected shader |
static PDFShader | getShader(PDFObject shaderObj, Map resources)
Parse a pdf shader into a shader object |
int | getType()
Get the type |
abstract void | parse(PDFObject shareObj)
Parse the shader-specific data |
protected void | setBackground(PDFPaint background)
Set the background color |
protected void | setBBox(Rectangle2D bbox)
Set the bounding box |
protected void | setColorSpace(PDFColorSpace colorSpace)
Set the color space |