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
Fields inherited from class com.itextpdf.kernel.colors.Color
colorSpace, colorValue
-
Constructor Summary
ConstructorDescriptionPatternColor
(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 TypeMethodDescriptionboolean
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
-
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 space -
color
- 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 space -
underlyingCS
- Underlying color space object -
colorValue
- 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 space -
uncoloredTilingCS
- Tiling pattern color space -
colorValue
- 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.
-