I know SVG supports This, but I don't know how to write it in an extension.
Here's a sample of what I'm trying to do.
(var2 needs to be a superscript)
Code: Select all
leng = str (int(var1)) + str(var2)
t='rotate(%f,%f,%f) matrix(1,0,0,1,0,-%f)' % (deg,x,y,0)
self.addText(
self.group,
x,
y,
leng, transform = t )
def addText(self,node,x,y,text,transform=None):
FontSize = self.options.FontSize* self.unittouu('1px')
new = inkex.etree.SubElement(node,inkex.addNS('text','svg'))
s = {'text-align': 'center', 'vertical-align': 'bottom','text-anchor': 'middle',
'font-size': FontSize, 'fill-opacity': '1.0', 'stroke': 'none',
'font-weight': 'normal', 'font-style': 'normal', 'fill': '#000'}
new.set('style', simplestyle.formatStyle(s))
if not transform==None:
new.set('transform', str(transform))
new.set('x', str(x))
new.set('y', str(y))
new.text = str(text)
Any help would be appreciated