Home:ALL Converter>Rotate path with svgwrite

Rotate path with svgwrite

Ask Time:2019-10-09T17:34:29         Author:mrgou

Json Formatter

Let's say I create a drawing with an arrow in SVG with svgwrite:

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()

Is there a way to rotate it 180° before saving it?

Thanks!

Author:mrgou,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58301161/rotate-path-with-svgwrite
yy