Package com.itextpdf.kernel.colors
Class PatternColor
java.lang.Object
com.itextpdf.kernel.colors.Color
com.itextpdf.kernel.colors.PatternColor
Representation of a Pattern Color.
-
Field Summary
FieldsFields inherited from class com.itextpdf.kernel.colors.Color
colorSpace, colorValue
-
Constructor Summary
ConstructorsConstructorDescriptionPatternColor
(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
Modifier and TypeMethodDescriptionprivate static PdfColorSpace
ensureNotPatternCs
(PdfColorSpace underlyingCS) boolean
Indicates whether the color is equal to the given color.Returns the pattern of the color space.void
setColorValue
(float[] value) Sets the color value of the colorMethods inherited from class com.itextpdf.kernel.colors.Color
convertCmykToRgb, convertRgbToCmyk, createColorWithColorSpace, getColorSpace, getColorValue, getNumberOfComponents, hashCode, makeColor, makeColor
-
Field Details
-
pattern
-
underlyingColor
-
-
Constructor Details
-
PatternColor
Creates a pattern color using the given color pattern object.- Parameters:
coloredPattern
- Color space that uses pattern objects
-
PatternColor
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 Details
-
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
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
-