W3C home > Mailing lists > Public > public-svg-wg@w3.org > October to December 2010

Re: ISSUE-2384: Order of rx / ry computation for rounded rects [SVG Full 1.1]

From: Alex Danilo <alex@abbra.com>
Date: Fri, 22 Oct 2010 08:37:03 +1100
Message-Id: <RDTNAL.TOICCEEY4Y8J@abbra.com>
To: SVG Working Group WG <public-svg-wg@w3.org>
We get some red here too, so I looked closer at the test.
We get the same result as the WebKit browsers and Firefox.

The test is in error IMO.

For example, the fourth rectangle from the left on the top row
chopped out (with fill added) has:

    <rect fill="red" x="190" width="20" height="100" rx="10"/>

    <rect fill="lime" x="190" width="20" height="100" rx="80"/>

The spec. text "If a properly specified value is provided for Ħrx˘ but not for Ħry˘,
then the user agent processes the Ħrect˘ element with the effective
value for Ħry˘ as equal to Ħrx˘." is pretty clear.

The effective value of 'ry' for the second rect in this case is 80.

In no way should clamping of 'rx' happen before using it for 'ry' since
that violates that first statement.

So, it's default then clamp as clearly specified. i.e. the second lime
rect should be equivalent to:

    <rect fill="lime" x="190" width="20" height="100" rx="80" ry="80"/>

but _not_:

    <rect fill="lime" x="190" width="20" height="100" rx="10" ry="10"/>

the second being Opera's and IE9's rendering equivalent.

Alex

--Original Message--:
>
>ISSUE-2384: Order of rx / ry computation for rounded rects [SVG Full 1.1]
>
>http://www.w3.org/Graphics/SVG/WG/track/issues/2384
>
>Raised by: Cameron McCormack
>On product: SVG Full 1.1
>
>This issue is raised based on Cameron's review of shapes-rect-03-t.svg[1].
>
>[[ I think the spec is unclear about the interaction between the different clamping and defaulting behaviours for rx/ry on <rect>.  The spec currently says:
> 
>  If a properly specified value is provided for Ħrx˘ but not for Ħry˘,
>  then the user agent processes the Ħrect˘ element with the effective
>  value for Ħry˘ as equal to Ħrx˘. If a properly specified value is
>  provided for Ħry˘ but not for Ħrx˘, then the user agent processes the
>  Ħrect˘ element with the effective value for Ħrx˘ as equal to Ħry˘. If
>  neither Ħrx˘ nor Ħry˘ has a properly specified value, then the user
>  agent processes the Ħrect˘ element as if no rounding had been
>  specified, resulting in square corners. If Ħrx˘ is greater than half
>  of the width of the rectangle, then the user agent processes the
>  Ħrect˘ element with the effective value for Ħrx˘ as half of the width
>  of the rectangle. If Ħry˘ is greater than half of the height of the
>  rectangle, then the user agent processes the Ħrect˘ element with the
>  effective value for Ħry˘ as half of the height of the rectangle.
> 
>It˘s not clear whether defaulting is done before clamping or vice versa.
>I decided to just follow the steps in order, and those results don˘t
>match the test.  (I think that order matches Firefox and WebKit,
>though.)
>]]
>
>Opera and IE9 currently display the test (revision 1.6) without red, while Firefox, Webkit and Batik display it with some red.
>
>[1] http://dev.w3.org/SVG/profiles/1.1F2/test/svg/shapes-rect-03-t.svg
>
>
>
>
>
Received on Thursday, 21 October 2010 21:38:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 21 October 2010 21:38:14 GMT