문제 설명
svgwrite로 기존 svg를 가져오는 방법 ‑ Python (How to import an existing svg with svgwrite ‑ Python)
기존 svg 사진을 가져와서 원 및 사각형과 같은 요소를 추가해야 합니다. 내 파일은 'test.svg'이므로 dwg = svgwrite.Drawing('test.svg')
를 시도했지만 아무 것도 없이 새 svg 파일을 만듭니다. 저는 python lib svgwrite를 사용합니다. 저에게 어떤 생각이 있으신가요? 감사합니다. 제 영어에 대해 죄송합니다... 최선을 다하겠습니다!
참조 솔루션
방법 1:
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.