I'm writing an extension and I wanted to know if it's possible to call a function from Inkscape's menu from within my python code?
So, if I've just created a text object like so:
Code: Select all
line_style = {'font-size': str(text_height) + 'px', 'font-style':'normal', 'font-weight': 'normal',
'fill': '#F6921E', 'font-family': 'sans-serif',
'text-anchor': 'middle', 'text-align': 'center'}
line_attribs = {inkex.addNS('label','inkscape'): 'Annotation',
'style': simplestyle.formatStyle(line_style),
'x': str(position[0]),
'y': str((position[1] + text_height) * 1.2)}
line = inkex.etree.SubElement(parent, inkex.addNS('text','svg'), line_attribs)
is there a way I can run the Path->Object to Path (or Shift+Ctrl+C) tool on that text?
I've had a lot of trial and error finding things I can and cannot do from inside my extension, but lack of an API means I don't even know where to begin with some things, like this.
Thanks for your help,
Antony