Re: [css3-background] border-radius color transitions using gradients recommended but undefined

Andrew Fedoniouk <news@terrainformatica.com> wrote:

> Zack Weinberg wrote:
> > Andrew Fedoniouk <news@terrainformatica.com> wrote:
> >> There are actually not too many alternatives.
> >>
> >> The most viable solution is to a) use conic gradient 
> > 
> > How are you drawing the conic gradients?  I've not been able to find
> > them as an accelerated primitive on any common OS.
> 
> Sciter and HTMLayout (h-smile core) are using AGG [1] for such things.
> So that part is implemented in code generating such bitmaps.

AGG as in Anti-Grain Geometry [ http://www.antigrain.com/ ]? I'll have
a look at that when I get a chance.

> (D) case on your image require non-trivial gradient function.
> Angle of that dark green sector will not be of 90deg and color
> spread function is not a linear interpolation of end points.
> That reduces optimization options to nothing. E.g. in my case
> it is possible to pre-compute map once and to use it for all border
> transitions no matter what color they will have.

I'd rather take a performance hit in case 10 (which will be rare in
practice, I think) than produce a rendering that looks like the browser
has a bug in it.  Which is my reaction to a situation where there's a
sharp inner corner but it isn't the center of the gradient cone, or the
gradient fails to extend to the limits of the outer arc.

zw

Received on Wednesday, 27 January 2010 19:32:24 UTC