How to know the length of an element

Discuss SVG code, accessible via the XML Editor.
katun89
Posts: 12
Joined: Sat Jan 08, 2011 12:57 pm

How to know the length of an element

Postby katun89 » Wed Feb 16, 2011 5:29 am

Hi guys, here is the problem:

I have to check whether a string is longer than the path which contains it. Is there a Dom method to know the length of an element? So I could check whether the first (element, the string) is longer than the second (the rect or path which contains it).
Can anyone help me? Please T_T

User avatar
prokoudine
Posts: 186
Joined: Sat Jun 09, 2007 4:32 am
Contact:

Re: How to know the length of an element

Postby prokoudine » Sat Feb 19, 2011 5:08 am

Use Measure Path extensions from Extensions menu
http://libregraphicsworld.org — news and tutorials on free design software

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to know the length of an element

Postby brynn » Sun Feb 20, 2011 11:33 am

Or if it's perfectly horizontal or vertical, use the node tool and do math with the X and Y coordinates.


Return to “SVG / XML Code”