Bryce,
This may be a foolish question...but here goes:
If you want to move the 2 objects that are snapped together couldn't you just use Inkscapes "Group Objects" tool. I haven't tried it, but is the "glued state" of grouped objects saved and reloaded?
I was just concerned with object snapping so I could precisely attach graphic objects to other graphic objects. I didn't think about maintaining the link.
Thanks for your thoughts.
(I'll have to see if I can talk my wife into some time for that C programming stuff. I don't know though, she's already jealous about the time I spend with Lady J. :])
-----Original Message----- From: Bryce Harrington [mailto:bryce@...69...] Sent: Thursday, May 06, 2004 12:34 PM To: inkscape-user@lists.sourceforge.net Subject: RE: [Inkscape-user] Snapping to the Grid
On Thu, 6 May 2004, Landon Blake wrote:
Let me check out some C code and see what I think. I definitley want to get involved in Inkscape is ever ported to Java.
Learning new languages is good for ya. ;-)
I'm curious what issues there would be with the relationship between SVG and snapping node-to-node in Inkscape. If two objects were snapped together at their nodes, wouldn't they just be stored in SVG with the same coordinate for the common node? Would anything else really need to be defined? I had imagined it working very similar to snapping nodes to the grid.
Well, in object-to-object linking, the linkage needs to be permanent and stored with the document. I guess this is a step beyond just snapping, in that once the two objects are linked, moving one object needs to cause the other one to move. For example, if you link a line to a box, and then move the box, the connected endpoint of the line needs to move.
This implies that some sort of information would need to be stored in the document, so if you save the file and reload it, the 'connectivity' information is still there.
Example: Line
<SnapNode> <Type>Midpoint</Type> <YCoordinate>24.56324</YCoordinate> <XCoordinate>10.32564</XCoordinate> </SnapNode>
This is just a rough idea of how it might look in XML. I imagine the SnapNode Element as a child element of the shape or path element. The Type Element might enable users in Inkscape to shut the different types of snaps on and off. (For example, if the user only wanted to snap to endpoints.) In the above scenario a simple one segment path or line would have 3 SnapNode Elements: 2 endpoints and 1 midpoint.
I did a quick google and found this bit on SVG and connection points: http://www.infoloom.com/gcaconfs/WEB/granada99/her.HTM
Scroll down to 'Automatic Connections'. It shows an example of connecting two shapes. I'm not sure if the syntax they're using is valid SVG or if it's particular to the application (drawml), though.
Bryce
------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user