org.icepdf.core.pobjects.graphics
Class PatternColor
java.lang.Object
org.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.graphics.PColorSpace
org.icepdf.core.pobjects.graphics.PatternColor
public class PatternColor
- extends PColorSpace
Pattern colour implements PColorSpace but is more of a parser placeholder
for dealing with 'cs' token which sets a pattern Colour space. The pattern
color space can either define a Pattern dictionary which contains valid
pattern object which are then specified by the 'scn' or 'SCN' tokens. The
pattern can also define straight up color space rgb, gray, N etc.
If the PatternColor contains dictionary of Pattern Object from the
pages resources then this object is created with the corrisponding
dictionary reference.
- Since:
- 1.0
|
Constructor Summary |
PatternColor(Library library,
java.util.HashMap entries)
Creates a new instance of PatternColor. |
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PATTERN_KEY
public static final Name PATTERN_KEY
PatternColor
public PatternColor(Library library,
java.util.HashMap entries)
- Creates a new instance of PatternColor.
- Parameters:
library - document library.entries - dictionary entries.
getNumComponents
public int getNumComponents()
- Not applicable to a Pattern Colour space.
- Specified by:
getNumComponents in class PColorSpace
- Returns:
- value of zero
getColor
public java.awt.Color getColor(float[] f,
boolean fillAndStroke)
- Not applicable to a Pattern Colour space.
- Specified by:
getColor in class PColorSpace
- Parameters:
f - any value.
- Returns:
- always returns null.
getPattern
public Pattern getPattern(Reference reference)
getPColorSpace
public PColorSpace getPColorSpace()
setPColorSpace
public void setPColorSpace(PColorSpace PColorSpace)
getPattern
public Pattern getPattern()
setPattern
public void setPattern(Pattern pattern)