Inkscape.org
Creating New Extensions Reverse the path direction
  1. #1
    czkPanda czkPanda @czkPanda

    Hi, I wonder if there is a simple way of reversing the path direction? 

    I have a back up solution that is get the original path start and end points and redraw new paths which reverse the start and end points when define the 'd' string. 

    Instead of redraw the paths, is there a simple solution? 

    Thanks!

     

  2. #2
    Kaalleen Kaalleen @Kaalleen

    You could reverse all selected path elements like this:

    for element in self.svg.selection:
        if element.get('d', None):
            d = element.get_path().reverse()
            element.set("d", d)