Inkscape.org
Creating New Extensions Add frame to text
  1. #1
    RW E2 RW E2 @RWE2

    This forum is so good to see!  I've been trying to learn how to create an extension, and I've picked up an assortment of conflicting and outdated information.  I feel like I need to start over from scratch.

    For several years now, Inkscape has been giving me delight.  I use it constantly to make infographics -- text-heavy montage.   I like to put rectangular boxes around the text, with the width and height of the margin around the text fixed.  Creating these boxes, centering them and adjusting the dimensions manually is very time-consuming.  Then, a few days ago, I discovered that Inkscape allows users to create their own extensions.  Aha!

    I have Inkscape 0.91, python 2.7.13, python 3.4.6, and 64-bit SuSE Linux g511 4.4.180.  The extensions I have in the /usr/share/inkscape/extensions directory all use python 2.  I hope this will change seen, because python no longer supports that version -- with good reason!  

    I found that I can use inkex.errormsg to get information about the nodes I'm processing, but text nodes have no width and height attributes.  There is a getBBox() function in SVG, but I don't know how to invoke it.  Help! 

    I in turn would love to help with the tutorial.  I do have basic programming skills in python, javascript, xml, svg -- and bash.

    I'd post my graphics, but they are political, and I'm not here to alienate the closed-minded.