Package com.itextpdf.kernel.colors
Class DeviceCmyk
- java.lang.Object
-
- com.itextpdf.kernel.colors.Color
-
- com.itextpdf.kernel.colors.DeviceCmyk
-
public class DeviceCmyk extends Color
Color space to specify colors according to CMYK color model.
-
-
Field Summary
Fields Modifier and Type Field Description static DeviceCmyk
BLACK
Predefined black DeviceCmyk colorstatic DeviceCmyk
CYAN
Predefined cyan DeviceCmyk colorstatic DeviceCmyk
MAGENTA
Predefined magenta DeviceCmyk colorstatic DeviceCmyk
YELLOW
Predefined yellow DeviceCmyk color-
Fields inherited from class com.itextpdf.kernel.colors.Color
colorSpace, colorValue
-
-
Constructor Summary
Constructors Constructor Description DeviceCmyk()
Creates 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DeviceCmyk
makeDarker(DeviceCmyk cmykColor)
ReturnsDeviceCmyk
color which is darker than given onestatic DeviceCmyk
makeLighter(DeviceCmyk cmykColor)
ReturnsDeviceCmyk
color which is lighter than given one-
Methods inherited from class com.itextpdf.kernel.colors.Color
convertCmykToRgb, convertRgbToCmyk, createColorWithColorSpace, equals, getColorSpace, getColorValue, getNumberOfComponents, hashCode, makeColor, makeColor, setColorValue
-
-
-
-
Field Detail
-
CYAN
public static final DeviceCmyk CYAN
Predefined cyan DeviceCmyk color
-
MAGENTA
public static final DeviceCmyk MAGENTA
Predefined magenta DeviceCmyk color
-
YELLOW
public static final DeviceCmyk YELLOW
Predefined yellow DeviceCmyk color
-
BLACK
public static final DeviceCmyk BLACK
Predefined black DeviceCmyk color
-
-
Constructor Detail
-
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 colorantm
- the intensity of magenta coloranty
- the intensity of yellow colorantk
- 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 colorantm
- the intensity of magenta coloranty
- the intensity of yellow colorantk
- the intensity of black colorant
-
-
Method Detail
-
makeLighter
public static DeviceCmyk makeLighter(DeviceCmyk cmykColor)
ReturnsDeviceCmyk
color which is lighter than given one- Parameters:
cmykColor
- the DeviceCmyk color to be made lighter- Returns:
- lighter color
-
makeDarker
public static DeviceCmyk makeDarker(DeviceCmyk cmykColor)
ReturnsDeviceCmyk
color which is darker than given one- Parameters:
cmykColor
- the DeviceCmyk color to be made darker- Returns:
- darker color
-
-