You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Amar Kulshrestha <ja...@hotmail.com> on 2002/07/23 05:32:51 UTC

Batik, SVG and graphical nodes

Hello,

     I am fairly new to SVG and Batik and was wondering if the following was 
possible:

     I need to create a Java application using swing and I need to track 
nodes to which there may be multiple "lines" terminating at it. The user 
then may decide to drag a node to a different point on the canvas, perhaps 
limited by some boundaries, but the other "attached" lines must move and 
stretch with the node accordingly. Ie, dragging the node with the mouse to a 
new location in real time.

     Is this type of dynamic display possible and if so is it smooth? I have 
been reading some of the mailing list articles regarding issues refreshing 
the canvas after changes have been made and see that some people are having 
problems.

     Can someone please tell me if this is possible and if so provide me 
with some sample code or a good starting point? I have a demo project coming 
up soon and would like to use SVG if possible versus some other graphic 
utility/tool.

thanks,
Amar



_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Batik, SVG and graphical nodes

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "AK" == Amar Kulshrestha <ja...@hotmail.com> writes:

AK>      I am fairly new to SVG and Batik and was wondering if the
AK> following was possible:

AK>      I need to create a Java application using swing and I need to
AK> track nodes to which there may be multiple "lines" terminating at
AK> it. The user then may decide to drag a node to a different point
AK> on the canvas, perhaps limited by some boundaries, but the other
AK> "attached" lines must move and stretch with the node
AK> accordingly. Ie, dragging the node with the mouse to a new
AK> location in real time.

AK>      Is this type of dynamic display possible and if so is it
AK> smooth? I have been reading some of the mailing list articles
AK> regarding issues refreshing the canvas after changes have been
AK> made and see that some people are having problems.

    With the 1.5 release this is possible.  As for smooth that is
always a question of expectations and the complexity of the image.  So
if you are talking about diagrams with 100's to 1000's of nodes all
highly interconnected you will probably be disappointed by performance.

    But more modestly sized documents with upto perhaps 100 nodes
without lines that streatch across everything performance should be
quite good.  Really the question is: How many things need to be
redrawn when the object moves?  So even if there are 1000s of nodes
but the lines are well isolated you will likely get excellent
performance.

AK>      Can someone please tell me if this is possible and if so
AK> provide me with some sample code or a good starting point? I have
AK> a demo project coming up soon and would like to use SVG if
AK> possible versus some other graphic utility/tool.

    I'd like to but the examples I have are written by other people so
I don't want to distribute them.  But the hard part is the code to
figure out where the lines should be updated to, once that is done you
just set the 'line' element's x1/y1 or x2/y2 attribute accordingly.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org