忽略转换,您可以像这样从SVG中提取路径字符串:
from xml.dom import minidomdoc = minidom.parse(svg_file) # parseString also existspath_strings = [path.getAttribute('d') for path in doc.getElementsByTagName('path')]doc.unlink()
忽略转换,您可以像这样从SVG中提取路径字符串:
from xml.dom import minidomdoc = minidom.parse(svg_file) # parseString also existspath_strings = [path.getAttribute('d') for path in doc.getElementsByTagName('path')]doc.unlink()