diff options
author | C. Scott Ananian <cscott@laptop.org> | 2008-09-10 21:02:20 (GMT) |
---|---|---|
committer | C. Scott Ananian <cscott@laptop.org> | 2008-09-10 21:02:20 (GMT) |
commit | c3f9b38c4ae583367c3762156340cf2f75d3e44b (patch) | |
tree | cd1721116cdfae70bb9a6ea6b5188f94b9f63df1 | |
parent | 3c6b281c5a5453a89d82a431c7bd3bde08e8081e (diff) |
Trac #7656: don't draw arc when pen is up.
Patch by eMBee. Thanks!
-rwxr-xr-x | taturtle.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/taturtle.py b/taturtle.py index efee5cd..8fbd1e1 100755 --- a/taturtle.py +++ b/taturtle.py @@ -102,7 +102,8 @@ def rarc(t,a,r): cx = t.xcor+r*cos(t.heading*DEGTOR) cy = t.ycor-r*sin(t.heading*DEGTOR) x,y,w,h=t.width/2+int(cx-r),t.height/2-int(cy+r),int(2*r),int(2*r) - t.canvas.image.draw_arc(t.gc,False,x,y,w,h,int(180-t.heading-a)*64,int(a)*64) + if t.pendown: + t.canvas.image.draw_arc(t.gc,False,x,y,w,h,int(180-t.heading-a)*64,int(a)*64) invalt(t,x-t.pensize/2-3,y-t.pensize/2-3,w+t.pensize+6,h+t.pensize+6) right(t,a) t.xcor=cx-r*cos(t.heading*DEGTOR) @@ -113,7 +114,8 @@ def larc(t,a,r): cx = t.xcor-r*cos(t.heading*DEGTOR) cy = t.ycor+r*sin(t.heading*DEGTOR) x,y,w,h=t.width/2+int(cx-r),t.height/2-int(cy+r),int(2*r),int(2*r) - t.canvas.image.draw_arc(t.gc,False,x,y,w,h,int(360-t.heading)*64,int(a)*64) + if t.pendown: + t.canvas.image.draw_arc(t.gc,False,x,y,w,h,int(360-t.heading)*64,int(a)*64) invalt(t,x-t.pensize/2-3,y-t.pensize/2-3,w+t.pensize+6,h+t.pensize+6) right(t,-a) t.xcor=cx+r*cos(t.heading*DEGTOR) |