org.freehep.graphics2d
Class PrintColor
java.lang.Object
java.awt.Color
org.freehep.graphics2d.PrintColor
- All Implemented Interfaces:
- Paint, Serializable, Transparency
- public class PrintColor
- extends Color
Print color for printing and display in color, grayscale and black/white.
- Version:
- $Id: PrintColor.java,v 1.5 2003/05/15 23:26:23 duns Exp $
- Author:
- Mark Donszelmann
- See Also:
- Serialized Form
- Source Code:
- PrintColor.java
Fields 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, YELLOW |
Constructor Summary |
PrintColor(Color color,
float asGray,
boolean asBlack)
|
PrintColor(float red,
float green,
float blue,
float asGray,
boolean asBlack)
|
PrintColor(float red,
float green,
float blue,
float alpha,
float asGray,
boolean asBlack)
|
Methods inherited from class java.awt.Color |
brighter, createContext, darker, decode, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, HSBtoRGB, RGBtoHSB |
COLOR
public static final int COLOR
- See Also:
- Constant Field Values
GRAYSCALE
public static final int GRAYSCALE
- See Also:
- Constant Field Values
BLACK_AND_WHITE
public static final int BLACK_AND_WHITE
- See Also:
- Constant Field Values
defaultColors
protected static Color[] defaultColors
asGray
protected float asGray
asBlack
protected boolean asBlack
PrintColor
public PrintColor(float red,
float green,
float blue,
float asGray,
boolean asBlack)
PrintColor
public PrintColor(float red,
float green,
float blue,
float alpha,
float asGray,
boolean asBlack)
PrintColor
public PrintColor(Color color,
float asGray,
boolean asBlack)
getAsGray
public float getAsGray()
getAsBlack
public boolean getAsBlack()
getColor
public PrintColor getColor(int mode)
createPrintColor
public static PrintColor createPrintColor(Color color)
getDefaultColor
public static Color getDefaultColor(int index)
- Returns:
- a color from the standard java colors
mixColor
public static Color mixColor(Color c1,
Color c2)
hashCode
public int hashCode()
equals
public boolean equals(Object obj)
toString
public String toString()
invert
public static PrintColor invert(Color color)
Copyright © 2000-2004 FreeHEP, All Rights Reserved.