org.jfree.pixie.wmf
Class GDIColor
Colororg.jfree.pixie.wmf.GDIColor
public class GDIColor
extends Color
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.
GDIColor(int colorref)- Creates a new GDI color instance by parsing the color reference.
|
GDIColor(int r, int g, int b, int flags)- Creates a new GDI Color instance.
|
int | getFlags()- Gets the assigned flag for the color.
|
boolean | isExplicit()- Returns the PC_EXPLICIT flag state for this color.
|
boolean | isNoCollapse()- Returns the PC_NOCOLLAPSE flag state for this color.
|
boolean | isReserved()- Returns the PC_RESERVED flag state for this color.
|
static int | translateColor(Color c)- Translates the given color instance into a GDI color reference.
|
PC_EXPLICIT
public static final int PC_EXPLICIT
PC_NOCOLLAPSE
public static final int PC_NOCOLLAPSE
PC_RESERVED
public static final int PC_RESERVED
GDIColor
public GDIColor(int colorref)
Creates a new GDI color instance by parsing the color reference.
colorref - the integer color reference.
GDIColor
public GDIColor(int r,
int g,
int b,
int flags) Creates a new GDI Color instance.
r - the red channel.g - the green channel.b - the blue channel.flags - the Windows Color flags.
getFlags
public int getFlags()
Gets the assigned flag for the color.
isExplicit
public boolean isExplicit()
Returns the PC_EXPLICIT flag state for this color.
- true, if PC_EXPLICIT is set, false otherwise.
isNoCollapse
public boolean isNoCollapse()
Returns the PC_NOCOLLAPSE flag state for this color.
- true, if PC_NOCOLLAPSE is set, false otherwise.
isReserved
public boolean isReserved()
Returns the PC_RESERVED flag state for this color.
- true, if PC_RESERVED is set, false otherwise.
translateColor
public static int translateColor(Color c)
Translates the given color instance into a GDI color reference.
c - the color that should be translated.
- the created color reference.