Package com.itextpdf.kernel.colors
Class DeviceCmyk
java.lang.Object
com.itextpdf.kernel.colors.Color
com.itextpdf.kernel.colors.DeviceCmyk
Color space to specify colors according to CMYK color model.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DeviceCmyk
Predefined black DeviceCmyk colorstatic final DeviceCmyk
Predefined cyan DeviceCmyk colorstatic final DeviceCmyk
Predefined magenta DeviceCmyk colorstatic final DeviceCmyk
Predefined yellow DeviceCmyk colorFields inherited from class com.itextpdf.kernel.colors.Color
colorSpace, colorValue
-
Constructor Summary
ConstructorDescriptionCreates DeviceCmyk color with all colorants intensities initialised as zeroes.DeviceCmyk
(float c, float m, float y, float k) Creates DeviceCmyk color by intensities of cyan, magenta, yellow and black colorants.DeviceCmyk
(int c, int m, int y, int k) Creates DeviceCmyk color by intensities of cyan, magenta, yellow and black colorants. -
Method Summary
Modifier and TypeMethodDescriptionstatic DeviceCmyk
makeDarker
(DeviceCmyk cmykColor) ReturnsDeviceCmyk
color which is darker than given onestatic DeviceCmyk
makeLighter
(DeviceCmyk cmykColor) ReturnsDeviceCmyk
color which is lighter than given oneMethods inherited from class com.itextpdf.kernel.colors.Color
convertCmykToRgb, convertRgbToCmyk, createColorWithColorSpace, equals, getColorSpace, getColorValue, getNumberOfComponents, hashCode, makeColor, makeColor, setColorValue
-
Field Details
-
CYAN
Predefined cyan DeviceCmyk color -
MAGENTA
Predefined magenta DeviceCmyk color -
YELLOW
Predefined yellow DeviceCmyk color -
BLACK
Predefined black DeviceCmyk color
-
-
Constructor Details
-
DeviceCmyk
public DeviceCmyk()Creates DeviceCmyk color with all colorants intensities initialised as zeroes. -
DeviceCmyk
public DeviceCmyk(int c, int m, int y, int k) Creates DeviceCmyk color by intensities of cyan, magenta, yellow and black colorants. The intensities are considered to be in [0, 100] gap, if not, the intensity will be considered as 100 (when colorant's value is bigger than 100) or 0 (when colorant's value is less than 0).- Parameters:
-
c
- the intensity of cyan colorant -
m
- the intensity of magenta colorant -
y
- the intensity of yellow colorant -
k
- the intensity of black colorant
-
DeviceCmyk
public DeviceCmyk(float c, float m, float y, float k) Creates DeviceCmyk color by intensities of cyan, magenta, yellow and black colorants. The intensities are considered to be in [0, 1] interval, if not, the intensity will be considered as 1 (when colorant's value is bigger than 1) or 0 (when colorant's value is less than 0).- Parameters:
-
c
- the intensity of cyan colorant -
m
- the intensity of magenta colorant -
y
- the intensity of yellow colorant -
k
- the intensity of black colorant
-
-
Method Details
-
makeLighter
ReturnsDeviceCmyk
color which is lighter than given one- Parameters:
-
cmykColor
- the DeviceCmyk color to be made lighter - Returns:
- lighter color
-
makeDarker
ReturnsDeviceCmyk
color which is darker than given one- Parameters:
-
cmykColor
- the DeviceCmyk color to be made darker - Returns:
- darker color
-