How to import an existing svg with svgwrite - Python
Asked Answered
J

1

10

I need to import an existing svg picture and add elements like circle and square on it. My file is 'test.svg' so i tryed
dwg = svgwrite.Drawing('test.svg')
but it create a new svg file without anything. I use the python lib svgwrite, do you have any idea for me?
Thank you, and sorry for my english... I do my best!

Joejoeann answered 24/11, 2016 at 19:47 Comment(0)
G
5

svgwrite will only create svg files. svgwrite does not read svg files. If you want to read, modify and then write the svg, the svgwrite package is not the package to use but I do not know of an appropriate package for you.

It might be possible to create svg which uses a reference to another image. That is there is one svg which you then put a second svg on top of the first. I have not done this and do not know if it would actually work.

Gregale answered 4/1, 2017 at 20:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.