This project has moved and is read-only. For the latest updates, please go here.

dynamic changes in DOM tree

Topics: Animation and Interactivity, Converters and Runtime, SVG, Viewers and Squiggle
Jun 1, 2011 at 9:30 AM

Hello all,


i try to convert an already finished java solution (based on batik) to .NET. One of the central fetures is to be able to dynamically change the svg content by manipulating the DOM tree. Those Changes are reflected directly in the viewer component. Is anything like that possible with sharpvectors? the workflow is almost identical until the image is displayed. but then there exists the concept of an update manager inside the bridge. In batik, one has to put the changes as runnables into the updatequeue. I have not yet found a concept in sharpvectors that resembles this mechanism. Is there anything like that? Is the way in SharpVectors different? Or is it impossible to get changes inside the DOM tree directly reflected in the displayed graphic?



Juergen Key

Jun 1, 2011 at 10:14 AM

Hello Juergen,

The current implementation does not support that use, because its main target is conversion.
The interactivity in the DOM tree cannot be completed with the support of scripting. At the time of
designing it, Microsoft dropped the support for JScript in the .NET and failed to implement it in the
DLR and since there was no alternative at the time, the interactivity was completed dropped.

However, we are now getting some complete and useful implementations of the JavaScript for .NET and so
the plan is to release the current as 1.0 targeting conversion and then work towards a complete SVG viewer/control
support in 2.0 or later. The current viewers/controls are implement and use the converters to create their
contents. The converters do not have incremental or partial conversion support. 

With the current implementation, you can simulate some basic dynamic changes in the DOM tree by listening to
changes in the XmlDocument and recreating the whole output again - very slow and may not be applicable to your case.

Batik is the leader in SVG rendering library, and developed over several years, we could only try to get
as close as possible. 

Unfortunately, version 2.0 or later may have to be .NET 4.x, since the bitmap effects such as Blur in .NET 3.5 are
software based and completely useless beyond basic UI decorations. 

Best regards,