public class InterpolatedColor extends java.awt.Color implements IInterpolated<InterpolatedColor>
Color
class that allows to calculate interpolated color values.Constructor and Description |
---|
InterpolatedColor(java.awt.Color pColor)
Creates an interpolated color object from a given color.
|
InterpolatedColor(int iRGB)
Creates an opaque sRGB color with the specified combined RGB value consisting of the
red component in bits 16-23, the green component in bits 8-15, and the blue component
in bits 0-7.
|
InterpolatedColor(int iRed,
int iGreen,
int iBlue)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255).
|
InterpolatedColor(int iRed,
int iGreen,
int iBlue,
int iAlpha)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).
|
Modifier and Type | Method and Description |
---|---|
InterpolatedColor |
interpolateLinearly(InterpolatedColor pOtherObject,
double dLambda)
Returns an
InterpolatedColor object representing the color which is an interpolation between the color of this object,
and the color that has been passed on as parameter. |
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
public InterpolatedColor(int iRGB)
iRGB
- the combined RGB componentspublic InterpolatedColor(int iRed, int iGreen, int iBlue, int iAlpha)
iRed
- The red component.iGreen
- The green component.iBlue
- The blue component.iAlpha
- The alpha component.public InterpolatedColor(int iRed, int iGreen, int iBlue)
iRed
- The red component.iGreen
- The green component.iBlue
- The blue component.public InterpolatedColor(java.awt.Color pColor)
pColor
- The color that should be represented.public InterpolatedColor interpolateLinearly(InterpolatedColor pOtherObject, double dLambda)
InterpolatedColor
object representing the color which is an interpolation between the color of this object,
and the color that has been passed on as parameter.interpolateLinearly
in interface IInterpolated<InterpolatedColor>
pOtherObject
- The second color that is needed to calculate the interpolated color.dLambda
- Steers the weight of the color. A value of 1 means that this color gets fully considered.
A value of 0 means that the parameter color gets fully considered. (TO DO: Should not it be the other way round?)