-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse_path_test.py
More file actions
18 lines (10 loc) · 1.01 KB
/
parse_path_test.py
File metadata and controls
18 lines (10 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#parse_path test
# 1st path from ae_bnw_bnw
from svgpathtools import parse_path
from svgpathtools import wsvg
'''
<path d="M0 0 C11.62333583 3.64550078 24.37435217 9.398092 31.27734375 19.953125 C32.83065485 23.24585821 33.51513911 26.39402626 33 30 C31 32 31 32 28.64453125 32.328125 C25.37718014 31.9227225 24.15300923 30.89548883 21.6875 28.75 C18.79580191 26.34907263 16.18472723 24.463324 12.75 22.9375 C5.86065819 19.67053037 3.40942672 14.24571982 0.69921875 7.46484375 C-0.03931778 4.86139935 -0.12956463 2.69206512 0 0 Z "
'''
path = parse_path('M0 0 C11.62333583 3.64550078 24.37435217 9.398092 31.27734375 19.953125 C32.83065485 23.24585821 33.51513911 26.39402626 33 30 C31 32 31 32 28.64453125 32.328125 C25.37718014 31.9227225 24.15300923 30.89548883 21.6875 28.75 C18.79580191 26.34907263 16.18472723 24.463324 12.75 22.9375 C5.86065819 19.67053037 3.40942672 14.24571982 0.69921875 7.46484375 C-0.03931778 4.86139935 -0.12956463 2.69206512 0 0 Z ')
# write this path to svg
wsvg(path, filename='output1.svg')