|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes the possibilities of a color conversion.
Consider the situation that a color is resent which is not in the needed color model; For instance a CMYK color is given and a RGB color is needed. In this situation a color converter can be used to translate between the given color and the needed color.
A color converter can refuse to translate a given color. In this case the
conversion method simply returns null
. This enables us to
define color converters which signal that a translation is not desirable
– e.g. because the result might be poor.
Method Summary | |
CmykColor |
toCmyk(Color color)
Convert an arbitrary color to the CMYK model. |
GrayscaleColor |
toGrayscale(Color color)
Convert an arbitrary color to the RGB model. |
HsvColor |
toHsv(Color color)
Convert an arbitrary color to the HSV model. |
RgbColor |
toRgb(Color color)
Convert an arbitrary color to the RGB model. |
Method Detail |
public CmykColor toCmyk(Color color)
null
is returned.
color
- the color to convert
null
if a conversion is not supported.public GrayscaleColor toGrayscale(Color color)
null
is returned.
color
- the color to convert
null
if
a conversion is not supported.public HsvColor toHsv(Color color)
null
is returned.
color
- the color to convert
null
if
a conversion is not supported.public RgbColor toRgb(Color color)
null
is returned.
color
- the color to convert
null
if
a conversion is not supported.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |