org.icepdf.core.pobjects.graphics
Class ShadingType2Pattern
java.lang.Object
org.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.graphics.ShadingPattern
org.icepdf.core.pobjects.graphics.ShadingType2Pattern
- All Implemented Interfaces:
- Pattern
- Direct Known Subclasses:
- ShadingType1Pattern
public class ShadingType2Pattern
- extends ShadingPattern
Type 2 (axial) shadings define colour blend that varies along a linear
axis between two endpoints and extends indefinitely perpendicular to the
that axis.
- Since:
- 2.7
- Author:
- ICEsoft Technologies Inc.
|
Field Summary |
protected java.util.List |
coords
|
protected java.util.List<java.lang.Number> |
domain
|
protected java.util.List<java.lang.Boolean> |
extend
|
protected Function[] |
function
|
| Fields inherited from class org.icepdf.core.pobjects.graphics.ShadingPattern |
antiAlias, ANTIALIAS_KEY, background, BACKGROUND_KEY, bBox, BBOX_KEY, colorSpace, COLORSPACE_KEY, COORDS_KEY, DOMAIN_KEY, EXTEND_KEY, extGState, EXTGSTATE_KEY, FUNCTION_KEY, inited, matrix, MATRIX_KEY, PATTERN_TYPE_KEY, patternType, shading, SHADING_KEY, SHADING_PATTERN_TYPE_1, SHADING_PATTERN_TYPE_2, SHADING_PATTERN_TYPE_3, SHADING_PATTERN_TYPE_4, SHADING_PATTERN_TYPE_5, SHADING_PATTERN_TYPE_6, SHADING_TYPE_KEY, shadingType, type |
|
Method Summary |
protected java.awt.Color[] |
calculateColorPoints(int numberOfPoints,
java.awt.geom.Point2D.Float startPoint,
java.awt.geom.Point2D.Float endPoint,
float t0,
float t1)
Calculates x number of points on long the line defined by the start and
end point. |
protected float[] |
calculateDomainEntries(int numberOfPoints,
float t0,
float t1)
Calculate domain entries givent the number of point between t0 and t1 |
java.awt.Paint |
getPaint()
Gets the Paint object need to fill a shape etc. |
void |
init()
Initialized shading dictionary attributes. |
java.lang.String |
toString()
Returns a summary of the dictionary entries. |
| Methods inherited from class org.icepdf.core.pobjects.graphics.ShadingPattern |
getBackground, getBBox, getColorSpace, getExtGState, getMatrix, getPatternType, getShadingPattern, getShadingPattern, getShadingType, getType, isAntiAlias, isInited, setMatrix, setParentGraphicState, setShading |
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
function
protected Function[] function
domain
protected java.util.List<java.lang.Number> domain
coords
protected java.util.List coords
extend
protected java.util.List<java.lang.Boolean> extend
ShadingType2Pattern
public ShadingType2Pattern(Library library,
java.util.HashMap entries)
init
public void init()
- Description copied from class:
ShadingPattern
- Initialized shading dictionary attributes. Discrepancies between sh and
scn tokens cause us to handle initialization at a later time.
- Specified by:
init in interface Pattern- Specified by:
init in class ShadingPattern
calculateColorPoints
protected java.awt.Color[] calculateColorPoints(int numberOfPoints,
java.awt.geom.Point2D.Float startPoint,
java.awt.geom.Point2D.Float endPoint,
float t0,
float t1)
- Calculates x number of points on long the line defined by the start and
end point.
- Parameters:
numberOfPoints - number of points to generate.startPoint - start of line segment.endPoint - end of line segment.
- Returns:
- list of points found on line
calculateDomainEntries
protected float[] calculateDomainEntries(int numberOfPoints,
float t0,
float t1)
- Calculate domain entries givent the number of point between t0 and t1
- Parameters:
numberOfPoints - number of points to calculatet0 - lower limitt1 - upper limit
- Returns:
- array of floats the evenly divide t0 and t1, length is
numberOfPoints + 1
getPaint
public java.awt.Paint getPaint()
- Description copied from class:
ShadingPattern
- Gets the Paint object need to fill a shape etc. Each individual
implementation will return a particular paint type.
- Specified by:
getPaint in interface Pattern- Specified by:
getPaint in class ShadingPattern
- Returns:
- Paint type for fill.
toString
public java.lang.String toString()
- Description copied from class:
Dictionary
- Returns a summary of the dictionary entries.
- Overrides:
toString in class ShadingPattern
- Returns:
- dictionary values.