question - text width and height

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

question - text width and height

Lukáš Haberzettl
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question - text width and height

Minglangjun Li
Hi Lukas,
Have a look at simpletransform.py. There's a computeBBox() method in it.

Regards,
Minglangjun

On Tue, Mar 14, 2017 at 4:14 PM, Lukáš Haberzettl <[hidden email]> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Loading...