public class ColorWithFallback
extends org.apache.xmlgraphics.java2d.color.ColorWithAlternatives
Color
subclass adding a fallback color that FOP uses to re-serialize
color specifications as textual functions. The fallback is otherwise not used in producing
output formats.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
BITMASK, OPAQUE, TRANSLUCENT
Constructor and Description |
---|
ColorWithFallback(Color color,
Color fallback)
Copy constructor adding a fallback color.
|
ColorWithFallback(ColorSpace cspace,
float[] components,
float alpha,
Color[] alternativeColors,
Color fallback)
Creates a new color
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Color |
getFallbackColor()
Returns the fallback color.
|
int |
hashCode() |
getAlternativeColors, getFirstAlternativeOfType, hasAlternativeColors, hasSameAlternativeColors
brighter, createContext, darker, decode, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, HSBtoRGB, RGBtoHSB, toString
public ColorWithFallback(ColorSpace cspace, float[] components, float alpha, Color[] alternativeColors, Color fallback)
cspace
- the color space of the primary colorcomponents
- the color componentsalpha
- the alpha componentalternativeColors
- the array of alternative colors if applicable (may be null)fallback
- the fallback color (usually an sRGB color)public Color getFallbackColor()
public int hashCode()
hashCode
in class org.apache.xmlgraphics.java2d.color.ColorWithAlternatives
Copyright © 2025 Apache Software Foundation. All rights reserved.