W3C home > Mailing lists > Public > www-svg@w3.org > August 2003

SVG1.1 - SVGPathElement Interface

From: Kevin Lindsey <kevin@kevlindev.com>
Date: Mon, 4 Aug 2003 12:13:49 -0500
Message-ID: <006701c35aab$c5bcad50$6401a8c0@monkey>
To: <www-svg@w3.org>
Howdy Folks,

I'm looking over the SVGPathElement interface in the SVG1.1 spec and I'm hoping to get some clarification on possible error situations encountered in the getPointAtLength and getPathSegAtLength methods.  Both of these methods expect a float parameter specifying the arc length to be used in their associated query.  The specification does not suggest what to do when the length parameter is outside of the path's arc length range.  Neither of these interfaces throw exceptions and I didn't see anything in the Error processing section (F.2) that described how to handle values outside of the path's arc length.  Initially, I thought it would be reasonable to return null values, but getPathSegAtLength returns an unsigned long so that idea is out and I can't return -1 for the same reason.  So, my questions are:
  1.. Should these methods throw exceptions when the parameter is out of range?
  2.. Should these methods return error conditions when the parameter is out of range and if so how?
  3.. If these methods should not return error conditions, then what is a reasonable return value?  Perhaps the closest in-range value should be used in the erroroneous value's place.
Thank you for any guidance or suggestions.

Kevin
KevLinDev - http://www.kevlindev.com
Received on Monday, 4 August 2003 13:13:41 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:25 GMT