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

Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 1/27/10 1:09 PM, Tab Atkins Jr. wrote:
> > On Wed, Jan 27, 2010 at 11:49 AM, Zack
> > Weinberg<zweinberg@mozilla.com>  wrote:
> >> Incidentally, those patches use square dots for borders that are
> >> less than three device pixels wide, which I think should be
> >> officially allowed.
> >
> > I think that, when you're dealing with only 2px-wide lines, a square
> > *is* round as a degenerate case.
> 
> That's highly nonobvious.  If you actually try to draw a circle of
> that size, graphics libraries will do all sorts of things with
> antialiasing, including subpixel anialiasing in some cases, to make
> it look "round".

Yep.  Cairo tries really hard but the result looks fuzzy and bad,
so (in the patch) I have our code switch to square dots at two
device pixels. Three-device-pixel circles look fine.

Possible wording: "The dots shall be circles unless they are small
enough relative to the device resolution that they cannot be drawn
crisply, in which case squares may be drawn instead."

zw

Received on Wednesday, 27 January 2010 19:25:54 UTC