I am trying to figure out how to measure the length in pixels of an arbitrary line graphic. I know that if the graphic has only two points I could do some math with the pythagorean theorem to figure out the length of the line, but I would like for my user to be able to create a path of several points and have the program automatically calculate how long the line is.
For example:
Graphic with points
100,100 | 100,150 | 125,125 | 200, 200
would make a nice zig-zag.
Is there a built-in function that I am missing which would tell me the "length" of a line, or am I going to have to generate a function that parses each point of the line and adds up a bunch of pythagorean calculations?
Thanks
