Python Forum
Rotate with just one line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotate with just one line
#4
See what you find when you google python svg. Since svg files are xml, maybe xml packages are a better option. There are serveral Python xml packages. The standard python distribution comes with xml.dom, xml.sax and xml.etree. I've heard good things about untangle, but it is getting old. Similar to untangle is xmltodict. Both of these read xml and create a python object to access the information.

Why do you want to rotate one of the lines? Structured vector graphics are not really meant to be used this way. They are meant to be do exactly what you are seeing, creating a graphic object that can be scaled or rotated about multiple axes. All the parts of the graphic affected by any translation or rotation. If you want two lines to act independently, you should have two svg files, or just draw lines. Even if you have success parsing your svg file, you still need to extract the line you want to rotate, rotate the line, place it back in the svg file, and load the file.

What is your end goal?
Reply


Messages In This Thread
Rotate with just one line - by MasterIphone - May-26-2024, 03:31 PM
RE: Rotate with just one line - by deanhystad - May-26-2024, 09:52 PM
RE: Rotate with just one line - by MasterIphone - May-26-2024, 11:40 PM
RE: Rotate with just one line - by deanhystad - May-27-2024, 02:01 AM
RE: Rotate with just one line - by MasterIphone - May-27-2024, 10:52 AM
RE: Rotate with just one line - by ebn852_pan - Jun-20-2024, 09:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to rotate lines in tkinter canvas helpmewithpython 1 3,595 Oct-06-2020, 06:56 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020