This project is read-only.

Get Bounding information of an SVG Element

Dec 10, 2015 at 7:32 PM
Hi there,

I'm new to the SVG library (and coding in general) and am trying to find out the bounding information of an SVG text element so I can display a highlight rectangle client side in a browser Canvas element.

My project previously did this via the getBBox method in the JavaScript. This wasn't perfect though as it didn't return the post-transform coordinates, but it got most of the way for what I needed.

I moved the SVG (and manipulation of it) server-side via c# to avoid the user needing to download the whole SVG into their browser, and found this project while searching which looks like it is quite interesting for what I am doing.

Is there a way of getting the bounding coordinates of an SVG text element using this project? If so, please could someone point me in the right direction with a couple of examples?