W3C home > Mailing lists > Public > public-css-testsuite@w3.org > October 2012

Tolerance of 1px on each side for anti-aliasing: feedback requested

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 17 Oct 2012 01:31:10 -0400
Message-ID: <0ad3b6961b9a83f835b17acf3955f32c.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Public CSS testsuite mailing list" <public-css-testsuite@w3.org>
Hello all,

I wish to know if we should allow to allocate 1px (as a margin of error
or latitude) on each side of squares, rectangles, etc.. to take into
account anti-aliasing.

Personally, I have never done that, this never happened in CSS 2.1 test
suite as far as I know and the most active contributors do not do that.

Typically, what is being done is:

        #overlapped-red {
            background: red;
            position: absolute;
            top: 1px;
            left: 1px;
            width: 158px;
            height: 158px;
        }

        #overlapping-green {
            background: green;
            position: absolute;
            top: 0px;
            left: 0px;
            width: 160px;
            height: 160px;
        }

so that the overlapping green is 2px wider and 2px taller than the
overlapped red. The painting covers more area than needed. Furthermore,
this way of coding is in a ttwf tutorial:

http://test.csswg.org/source/contributors/ttwf/samples/ttwf-reftest-tutorial-001.html

Should we allow (tolerate) this, encourage this or disallow this?

Why would doing this be necessary anyway, to begin with?

--------

Sometimes, consequences of rounding effects could be misinterpreted as
anti-aliasing effects.

Eg. (to be viewed with Opera 12.02)

http://www.gtalbot.org/BrowserBugsSection/review/background-size-xyz.html

Rescaling from 60px to 100px implies an increase of 66.66666% and so
rounding down of percentage and then rounding down of fractional pixel
seem to occur for Opera 12.02 in such test.

Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Wednesday, 17 October 2012 05:31:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 17 October 2012 05:31:40 GMT