Class PdfBoxGraphics2DColor
java.lang.Object
java.awt.Color
de.rototor.pdfbox.graphics2d.PdfBoxGraphics2DColor
- All Implemented Interfaces:
IPdfBoxGraphics2DColor, Paint, Transparency, Serializable
- Direct Known Subclasses:
PdfBoxGraphics2DCMYKColor
Universal PDColor Carrying class. It does not assume any specific colorspace.
Useful for e.g. speration colors
- See Also:
-
Field Summary
Fields inherited from class Color
black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOWFields inherited from interface Transparency
BITMASK, OPAQUE, TRANSLUCENT -
Constructor Summary
ConstructorsConstructorDescriptionPdfBoxGraphics2DColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color) PdfBoxGraphics2DColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color, int alpha) PdfBoxGraphics2DColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color, int alpha, boolean overprint) -
Method Summary
Modifier and TypeMethodDescriptionintgetAlpha()booleanorg.apache.pdfbox.pdmodel.graphics.color.PDColorMethods inherited from class Color
brighter, createContext, darker, decode, equals, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString
-
Constructor Details
-
PdfBoxGraphics2DColor
public PdfBoxGraphics2DColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color) - Parameters:
color- the PDColor
-
PdfBoxGraphics2DColor
public PdfBoxGraphics2DColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color, int alpha) - Parameters:
color- the PDColoralpha- the alpha to use
-
PdfBoxGraphics2DColor
public PdfBoxGraphics2DColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color, int alpha, boolean overprint) - Parameters:
color- the PDColoralpha- the alpha to useoverprint- determine if overprint should be used
-
-
Method Details
-
getAlpha
-
isOverprint
public boolean isOverprint()- Specified by:
isOverprintin interfaceIPdfBoxGraphics2DColor- Returns:
- true if this color should be applied with overprint
-
toPDColor
public org.apache.pdfbox.pdmodel.graphics.color.PDColor toPDColor()- Specified by:
toPDColorin interfaceIPdfBoxGraphics2DColor- Returns:
- the PDColor represented by this color object
-