Reputation: 39
I am creating a svg file and adding text to it using svgwrite, if the width of my text id is 0 I need it to be 90 degrees rotated
This is how I am doing it but I am still not able to get it rotated
if (int(text_list[i]['width']) == 0):
g.add(dwg.text(string, insert=(left, top), transform="rotate(90)"))
Upvotes: 1
Views: 1141
Reputation: 39
pcRotate = 'rotate(270,%s, %s)' % (left,top)
g.add(dwg.text(string, insert=(left, top), transform= pcRotate)
on specifying the points around which I need to rotate the text, I am getting the desired results.
Upvotes: 1