W3C home > Mailing lists > Public > www-style@w3.org > January 2010

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

From: Zack Weinberg <zweinberg@mozilla.com>
Date: Wed, 27 Jan 2010 11:31:50 -0800
To: news@terrainformatica.com
Cc: "www-style@w3.org" <www-style@w3.org>, Brian Manthos <brianman@microsoft.com>
Message-ID: <20100127113150.140bb52e@mozilla.com>
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.

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:31 UTC