DOM Interface for SVGPathElement

I would like to suggest an additional method be added to the SVGPathElement
that would optimizes the addition of common x,y path segments while
still allowing the full flexibility of the existing model to be used.

Currently to add an moveto segment to a path, you would need to
do something like this (in a VB like pseudo code)

Dim pathSeg as SVGPathSeg
set pathSeg = pathElem.createSVGPathSeg
pathSeg.pathSegType = SVG_PATHSEG_MOVETO_ABS
pathSeg.x = 0
pathSeg.y = 0
pathElem.pathSegList.append pathSeg

The code has approximately 7 calls which if late-bound VB would add a
comparable number of calls to IDispatch::GetIDsOfNames and IDispatch::Invoke.

Since this could be a very high frequency call, 
there could be a substantial performance improvement as well as a simplification
of client code, if in addition to this existing methods, an additional method named
something like "appendSeg" was added to SVGPath element.  Something like:

void appendSeg(unsigned short pathSegType,x,y)  raises (SVGException);

Received on Tuesday, 7 March 2000 11:40:25 UTC