Package com.itextpdf.kernel.colors
Class PatternColor
- java.lang.Object
-
- com.itextpdf.kernel.colors.Color
-
- com.itextpdf.kernel.colors.PatternColor
-
public class PatternColor extends Color
Representation of a Pattern Color.
-
-
Field Summary
Fields Modifier and Type Field Description private PdfPattern
pattern
private Color
underlyingColor
-
Fields inherited from class com.itextpdf.kernel.colors.Color
colorSpace, colorValue
-
-
Constructor Summary
Constructors Constructor Description PatternColor(PdfPattern coloredPattern)
Creates a pattern color using the given color pattern object.PatternColor(PdfPattern.Tiling uncoloredPattern, Color color)
Creates a pattern color using the given uncolored pattern object and color.PatternColor(PdfPattern.Tiling uncoloredPattern, PdfColorSpace underlyingCS, float[] colorValue)
Creates a pattern color using the given uncolored pattern object, an underlying color space and color values.PatternColor(PdfPattern.Tiling uncoloredPattern, PdfSpecialCs.UncoloredTilingPattern uncoloredTilingCS, float[] colorValue)
Creates a pattern color using the given uncolored pattern object, uncolored tiling pattern and color values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static PdfColorSpace
ensureNotPatternCs(PdfColorSpace underlyingCS)
boolean
equals(java.lang.Object o)
Indicates whether the color is equal to the given color.PdfPattern
getPattern()
Returns the pattern of the color space.void
setColorValue(float[] value)
Sets the color value of the color-
Methods inherited from class com.itextpdf.kernel.colors.Color
convertCmykToRgb, convertRgbToCmyk, createColorWithColorSpace, getColorSpace, getColorValue, getNumberOfComponents, hashCode, makeColor, makeColor
-
-
-
-
Field Detail
-
pattern
private PdfPattern pattern
-
underlyingColor
private Color underlyingColor
-
-
Constructor Detail
-
PatternColor
public PatternColor(PdfPattern coloredPattern)
Creates a pattern color using the given color pattern object.- Parameters:
coloredPattern
- Color space that uses pattern objects
-
PatternColor
public PatternColor(PdfPattern.Tiling uncoloredPattern, Color color)
Creates a pattern color using the given uncolored pattern object and color.- Parameters:
uncoloredPattern
- Tiling pattern object of the color spacecolor
- Color object
-
PatternColor
public PatternColor(PdfPattern.Tiling uncoloredPattern, PdfColorSpace underlyingCS, float[] colorValue)
Creates a pattern color using the given uncolored pattern object, an underlying color space and color values.- Parameters:
uncoloredPattern
- Tiling pattern object of the color spaceunderlyingCS
- Underlying color space objectcolorValue
- Color values
-
PatternColor
public PatternColor(PdfPattern.Tiling uncoloredPattern, PdfSpecialCs.UncoloredTilingPattern uncoloredTilingCS, float[] colorValue)
Creates a pattern color using the given uncolored pattern object, uncolored tiling pattern and color values.- Parameters:
uncoloredPattern
- Tiling pattern object of the color spaceuncoloredTilingCS
- Tiling pattern color spacecolorValue
- Color values
-
-
Method Detail
-
getPattern
public PdfPattern getPattern()
Returns the pattern of the color space.- Returns:
- PdfPattern object
-
setColorValue
public void setColorValue(float[] value)
Description copied from class:Color
Sets the color value of the color- Overrides:
setColorValue
in classColor
- Parameters:
value
- new color value
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:Color
Indicates whether the color is equal to the given color. Thecolor space
andcolor value
are considered during the comparison.
-
ensureNotPatternCs
private static PdfColorSpace ensureNotPatternCs(PdfColorSpace underlyingCS)
-
-