假设我使用svgwrite在SVG中用箭头创建了一个图形:
In [1]: import svgwrite
In [2]: dwg = svgwrite.Drawing('arrow.svg')
In [3]: path = dwg.path(d='M 0,283.45145 H 39.819792 v 13.22917 L 66.278127,270.22229 39.819793,243.76395 v 13.22917 H
...: 0 Z')
dwg.add(path)
In [4]: dwg.save()
是否可以在保存之前将其旋转180°?
谢谢!
答案 0 :(得分:0)
您可以在路径上添加一个变换,例如
path = dwg.path(d='M 0,283.45145 H 39.819792 v 13.22917 L 66.278127,270.22229 39.819793,243.76395 v 13.22917 H...: 0 Z', transform="rotate(180)")