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

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. :-)

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Monday, 1 November 2010 02:35:26 UTC