import pyx
orig_p = pyx.path.line(0,0,5,5)
par_p = pyx.deformer.parallel(0).deform(orig_p)
This example produces an AttributeError which should not happen.
It is caused by the method parallel.deformsubpath which returns
a wrong type if the distance is too small.
I think the attached patch can remedy this deficiency.
Ciao
Andreas
Index: deformer.py
===================================================================
--- deformer.py (revision 2997)
+++ deformer.py (working copy)
@@ -726,12 +726,13 @@
dist = self.dist_pt
epsilon = orig_nsp.epsilon
+ result = normpath.normpath()
+
# avoid too small dists: we would run into instabilities
if abs(dist) < abs(epsilon):
- return orig_nsp
+ result.normsubpaths = [orig_nsp]
+ return result
- result = normpath.normpath()
-
# iterate over the normsubpath in the following manner:
# * for each item first append the additional arc / intersect
# and then add the next parallel piece
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel