xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Status of the new color infrastructure
Date Thu, 01 Jul 2010 12:55:49 GMT
On 01.07.2010 13:22:35 Vincent Hennebert wrote:
<snip/>
> ColorExt is meaningless anyway. I don’t know what the old version was
> supposed to do but the new one looks much clearer: ColorAlternatives;
> AlternateColors; FallbackColor; ColorList;
> ColorWithAPrioritizedListOfPreferredVersionsAndAFallbackIfNoneOfThemIsSupported.

I like the last one. ;-) IMO, ColorExt is not that bad since it's short
and says that it's an extended color, but yeah, it's a little lame.
ColorAlternatives is not that bad but like ColorList it may send the
wrong message. For example, ColorList suggests a list of colors, but the
class itself is actually a color. Maybe it has to be
"ColorWithAlternatives". That basically says exactly what it is although
it's a bit longer than ColorExt.

> Also, I very much doubt that that class should extend Color, but this is
> another topic.

IMO, there's one very VERY good reason for extending it from Color: An
implementation that doesn't support any of the color alternatives can
just live with the sRGB fallback which is also the color that both
XSL-FO and SVG specify to be the general fallback. No special code is
needed to support basic sRGB colors. I believe it would make the code a
lot more complicated if it were not descended from Color. Imagine only
our Graphics2D implementations which receive Color instances. I can't
even begin to imagine how this would be solved with a non-Color-based
color container.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Mime
View raw message