Hi Michael,

Bishop, Michael W. CONTR J9C880 wrote:

I’m implementing a “free-form” line where the user can draw by pressing and holding the mouse. This is for a whiteboard application. I sample the mouse locations, get a collection of Points, and then create a “polyline” element from the results and append it to the document (in the RunnableQueue) which should update my JSVGCanvas (set to ALWAYS_DYNAMIC). This will not update the screen! I can draw other shapes using the SVGShape class (Ellipse, Rectangle, Line) and they all work fine.

   So you create the 'polyline' element and the SVGShape class creates
the others?  Then the most likely problem is that you are not setting
the SVGNamespace when you create your polyline element.  So you have
a poly line element it's just not an SVG polyline element.  you
want to use something like:

element = document.createElementNS(SVGConstants.SVG_NAMESPACE_URI,
                                   SVGConstants.SVG_POLYGON_TAG);

Even drawing after the polyline does not cause the polyline to be rendered. However, if I save the SVGDocument to a file, then load it, the polyline shows up??

   Yes, this is common, when you read the document back it 'fixes' the
namespace problem.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to