Re: SVGLength.convertToSpecifiedUnits()

Hi Steve,

On Thu, 22 May 2003, Steve Schafer wrote:

> In SVG 1.1, the description for SVGLength.convertToSpecifiedUnits() says
> "No Exceptions," but there are situations where the results would be
> undefined:

Thanks for noticing this.

> 1) If the unitType is SVG_LENGTHTYPE_UNKNOWN, then the results of the
> conversion are obviously undefined. (Setting the value to zero would be
> a reasonable default behavior in this case.)

Not sure if this is better than throwing an exception.

> 2) If either the existing unitType or to-be-assigned unitType are
> SVG_LENGTHTYPE_PERCENTAGE, SVG_LENGTHTYPE_EXS or SVG_LENGTHTYPE_EMS,
> then the results of the conversion are undefined if the two unitTypes
> are different and the SVGLength exists outside of a DOM tree. (I can't
> think of a reasonable default behavior in this case.)

OK.

Hopefully there will be some change in a future SVG draft and
maybe an errata for SVG 1.0/1.1.

Dean

Received on Tuesday, 3 June 2003 23:44:35 UTC