xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Jolif <cjo...@ilog.fr>
Subject Re: [commit] MutlitpleGradientPaintContext
Date Fri, 08 Dec 2000 07:52:30 GMT

Christophe Jolif wrote:

> Nico Talian wrote:
> >
> > Hmmm, this could be problematic, because the SVG spec says
> >
> > "If two gradient stops have the same offset value, then the latter
> > gradient stop controls the color value at the overlap point."
> >
> > If this is in fact the behavior we want, then additional changes need to
> > be made because right now the example and changes you provide will
> > probably be rendered as a smooth gradient going from black....red and then
> > abruptly change from red to blue (instant change because the lookup method
> > will switch from one gradient array to the other), then followed by
> > a blue...white transition.
> >
> > There probably should be another loop to go over the entire input arrays
> > and remove overlapping stops like this and always choose the latter point
> > in these cases.
> >
> > I may be mistaken, but that is my analysis of the situation.
> There's two way of understanding the specification. The first one is:
>       <stop offset="0" style="stop-color:black"/>
>       <stop offset="0.2" style="stop-color:red"/>
>       <stop offset="0.2" style="stop-color:blue"/>
>       <stop offset="1" style="stop-color:white"/>
> is equivalent
> to
>       <stop offset="0" style="stop-color:black"/>
>       <stop offset="0.2" style="stop-color:blue"/>
>       <stop offset="1" style="stop-color:white"/>
> I think it is what you are suggesting? In this case it should not be the
> gradient code that deal with this case but the bridge that creates the
> gradient without taking into account the second stop.
> My understanding was different, I thought it only means that at the
> exact point of the stop (0.2) the color is the color of the latter stop.
> But maybe you're right. That's why I will ask to the WG for
> clarification. Anyway, it doesn't prevent from keeping the
> MultipleGradientPaintContext modification (for other use that pure SVG)
> even if we need to modify the bridge to be compliant...

After checking with the WG, it seems that my guess was the right one.
Jon will modify the spec to make it clearer. So Batik should be ok on
this point now.


View raw message