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.
| Modifier and Type | Field and Description |
|---|---|
static Name |
PATTERN_KEY |
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY| Constructor and Description |
|---|
PatternColor(Library library,
java.util.HashMap entries)
Creates a new instance of PatternColor.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getColor(float[] f,
boolean fillAndStroke)
Not applicable to a Pattern Colour space.
|
int |
getNumComponents()
Not applicable to a Pattern Colour space.
|
Pattern |
getPattern() |
Pattern |
getPattern(Reference reference) |
PColorSpace |
getPColorSpace() |
void |
setPattern(Pattern pattern) |
void |
setPColorSpace(PColorSpace PColorSpace) |
getColor, getColorSpace, getColorSpace, getDescription, normaliseComponentsToFloats, reverse, reverseInPlace, reverseInPlacegetEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toStringpublic static final Name PATTERN_KEY
public PatternColor(Library library, java.util.HashMap entries)
library - document library.entries - dictionary entries.public int getNumComponents()
getNumComponents in class PColorSpacepublic java.awt.Color getColor(float[] f,
boolean fillAndStroke)
getColor in class PColorSpacef - any value.public PColorSpace getPColorSpace()
public void setPColorSpace(PColorSpace PColorSpace)
public Pattern getPattern()
public void setPattern(Pattern pattern)