Class GDIColor
java.lang.Object
java.awt.Color
org.pentaho.reporting.libraries.pixie.wmf.GDIColor
- All Implemented Interfaces:
Paint,Transparency,Serializable
A color implementation, that supports some additional flags defined by the Windows API, but has no Alpha-Channel.
This is a BGR color implementation, the flags are stored in the highest byte.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class java.awt.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 java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetFlags()Gets the assigned flag for the color.booleanReturns the PC_EXPLICIT flag state for this color.booleanReturns the PC_NOCOLLAPSE flag state for this color.booleanReturns the PC_RESERVED flag state for this color.static intTranslates the given color instance into a GDI color reference.Methods inherited from class java.awt.Color
brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString
-
Field Details
-
PC_RESERVED
public static final int PC_RESERVED- See Also:
-
PC_EXPLICIT
public static final int PC_EXPLICIT- See Also:
-
PC_NOCOLLAPSE
public static final int PC_NOCOLLAPSE- See Also:
-
-
Constructor Details
-
GDIColor
public GDIColor(int colorref) Creates a new GDI color instance by parsing the color reference.- Parameters:
colorref- the integer color reference.
-
GDIColor
public GDIColor(int r, int g, int b, int flags) Creates a new GDI Color instance.- Parameters:
r- the red channel.g- the green channel.b- the blue channel.flags- the Windows Color flags.
-
-
Method Details
-
isReserved
public boolean isReserved()Returns the PC_RESERVED flag state for this color.- Returns:
- true, if PC_RESERVED is set, false otherwise.
-
isExplicit
public boolean isExplicit()Returns the PC_EXPLICIT flag state for this color.- Returns:
- true, if PC_EXPLICIT is set, false otherwise.
-
isNoCollapse
public boolean isNoCollapse()Returns the PC_NOCOLLAPSE flag state for this color.- Returns:
- true, if PC_NOCOLLAPSE is set, false otherwise.
-
getFlags
public int getFlags()Gets the assigned flag for the color.- Returns:
- the flags.
-
translateColor
Translates the given color instance into a GDI color reference.- Parameters:
c- the color that should be translated.- Returns:
- the created color reference.
-