0

Is there a way get the dimensions i.e. width and height of a (possibly complex) Path element? More specifically i want to draw a rect around some Path elements, for which i need to know their dimensions. I am using a program which generates raw svg files (text). So it would be helpful to know how could i write the operations directly in the actual .svg file.

  • 1
    Sure it's possible. What are you wanting to use? JavaScript? Illustrator/Inkscape? Maybe sharing your end goal would be helpful. – Zach Saucier Mar 20 at 14:23
  • Welcome to GD.SE - Please look through tour to get a sense of our community – who we are and what we’re about. Then look over How to Ask and How to Answer a question to see what makes a good query here, and how best to frame it. As initially posted, we can't tell which application (if any) you're using, whether you're approaching this as a graphic design exercise or a coding exercise - what your end use-case or scenario is - there's just a huge lack of clarity in your query at the moment; could you please read How to Ask and edit your question to better fit our guidelines? Thanks! – GerardFalla Mar 20 at 17:13
  • @ZachSaucier I am generating an svg file with a Lisp program. See my updates, hope it's helpful? – Student Mar 20 at 23:56
  • 1
    So you're wanting to use lisp to analyze the path and create the rectangle? That's not a super straightforward task, but neither is generating a bunch of SVG. Are you using a package or library in lisp? This is sounding more and more like a question for the package you're using/StackOverflow. – Zach Saucier Mar 21 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.