"""
Copyright (C) 2005 Aaron Spike, aaron@ekips.org
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
import simplepath
from math import *
for m in mlist[1:]:
return prod
pt[0]=x
pt[1]=y
A=p1[:]
return([[A[:],A[:],A[:]],[B[:],B[:],B[:]]])
k=[-(B[1]-A[1]),B[0]-A[0]]
d=k[0]*k[0]+k[1]*k[1]
k[0]/=sqrt(d)
k[1]/=sqrt(d)
d*=-1
O=[(B[0]+A[0])/2+d*k[0],(B[1]+A[1])/2+d*k[1]]
start*=-1
end*=-1
#v=dTeta*2/pi*0.552
#v=dTeta*2/pi*4*(sqrt(2)-1)/3
#if not sweepflag:
# v*=-1
p=[]
p[ 0][0]=p[ 0][1][:]
p[-1][2]=p[-1][1][:]
for pts in p:
return(p)
csp = []
subpath = -1
subpathstart = []
last = []
lastctrl = []
for s in simplepath:
if cmd == 'M':
if last:
subpath += 1
subpathstart = params[:]
elif cmd == 'L':
elif cmd == 'C':
elif cmd == 'Q':
elif cmd == 'A':
elif cmd == 'Z':
last = subpathstart[:]
lastctrl = subpathstart[:]
#append final superpoint
return csp
a = []
if subpath:
return a
def parsePath(d):
def formatPath(p):
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99