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

From: Erik Dahlstrom <ed@opera.com>
Date: Mon, 08 Nov 2010 14:32:46 +0100
To: "Cameron McCormack" <cam@mcc.id.au>

Message-ID: <op.vlus3rh2geuyw5@localhost>
```On Mon, 01 Nov 2010 03:34:49 +0100, Cameron McCormack <cam@mcc.id.au>
wrote:

> Erik Dahlstrom:
>> I would really like there to be some better wording in the spec for
>> this,
>> providing unambigous steps to follow to compute the effective value of
>> rx and ry.
>
> Yes.  Here is my suggested text to replace that paragraph:
>
>   The values used for the x- and y-axis rounded corner radii are
>   determined implicitly if the ‘rx’ or ‘ry’ attributes (or both)
>   are not specified, or are specified but with invalid values.
>   The values are also subject to clamping so that the lengths of
>   the straight segments of the rectangle are never negative.  The
>   effective values for ‘rx’ and ‘ry’ are determined by following
>   these steps in order:
>
>    1. Let rx and ry be length values.
>
>    2. If neither ‘rx’ nor ‘ry’ are properly specified, then set both
>       rx and ry to 0.  (This will result in square corners.)
>
>    3. Otherwise, if a properly specified value is provided for ‘rx’, but
>       not for ‘ry’, then set both rx and ry to the value of ‘rx’.
>
>    4. Otherwise, if a properly specified value is provided for ‘ry’, but
>       not for ‘rx’, then set both rx and ry to the value of ‘ry’.
>
>    5. Otherwise, both ‘rx’ and ‘ry’ were specified properly.  Set rx to
>       the value of ‘rx’ and ry to the value of ‘ry’.
>
>    6. If rx is greater than half of ‘width’, then set rx to half of
>       ‘width’.
>
>    7. If ry is greater than half of ‘height’, then set ry to half of
>       ‘height’.
>
>    8. The effective values of ‘ry’ and ‘ry’ are rx and ry, respectively.
>
> Verbose, perhaps, but hopefully clearer for dummies like me. :-)

Thanks, that's much clearer, unless there are any objections I'd say let's
put that wording into 1.1F2.

Cheers
/Erik

--
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
```
Received on Monday, 8 November 2010 13:33:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:12 UTC