question - text width and height

Hi, I am working on an extension for markdown -> svg text transform and currently facing a problem with getting text dimensions. I would like to position and scale my result (Group containing several text elements) into required values but I don’t know how can I get width and height of that group. Is there a way to get these values? I’ve read about using BBox. Is there a functionality maybe in inkex package to get BBox of an element ?
I’ll be glad for any advice.
Thank you, Lukas Haberzettl

Hi Lukas, Have a look at simpletransform.py http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/share/extensions/simpletransform.py. There's a computeBBox() method in it.
Regards, Minglangjun
On Tue, Mar 14, 2017 at 4:14 PM, Lukáš Haberzettl <l.haber@...3494...2...> wrote:
Hi, I am working on an extension for markdown -> svg text transform and currently facing a problem with getting text dimensions. I would like to position and scale my result (Group containing several text elements) into required values but I don’t know how can I get width and height of that group. Is there a way to get these values? I’ve read about using BBox. Is there a functionality maybe in inkex package to get BBox of an element ?
I’ll be glad for any advice.
Thank you, Lukas Haberzettl
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (2)
-
Lukáš Haberzettl
-
Minglangjun Li