Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#1330 closed enhancement (wontfix)

turtle art clean brick

Reported by: walter Owned by: walter
Priority: Unspecified by Maintainer Milestone:
Component: Turtleart Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

it would be good to have a tile that only cleaned the graphics and kept the other setting such as current pen thickness, colour, turtle position, heading etc

logowriter had a
rg reset graphics which acted like the TA clean
and a
clean which acted like I'm suggesting in my first line, other settings not being reset

for example
I wanted to write a procedure that showed the number of the colour as the colour changed by changing the heading, for instance

I can do that but it would be much easier and initially more understandable for students if there was a clean that kept other settings

it would even better still if there was a separate way to erase show while the procedure was running

( I haven't looked at the python yet )

How to do it with the current TA
store in box1: 0
repeat 90

setpensize 10
right box1
set color heading
show heading
forward 100
back 100
wait 10
store in box1: box1 + 1
clean (everything resets)

How to do it with a clean that cleans graphics but keeps other settings:

setpensize 10

repeat 90

forward 100
back 100
right 1
set color heading
show heading
wait 10
clean (only the graphics are cleaned)

The ability to see how heading works concretely in action and to program this fairly easily would make a difference as to the percentage of students who grasp the concept
Actually for a while there I thought that setpensize was broken because I didn't realise that clean was a total reset

--Bill Kerr

Change History (4)

comment:1 Changed 12 years ago by walter

Good point. I'll look into adding the new block (probably not until
after feature freeze, alas). In the meanwhile, you could try this code
loaded into the programmable brick (the one that loads Python code
from the journal):

# clear canvas without reseting any turtle parameters
rect = gtk.gdk.Rectangle(0,0,lc.tw.turtle.width,lc.tw.turtle.height)
lc.tw.turtle.gc.set_foreground(lc.tw.bgcolor)
lc.tw.turtle.canvas.image.draw_rectangle(lc.tw.turtle.gc, True, *rect)
invalt(lc.tw.turtle,0,0,lc.tw.turtle.width,lc.tw.turtle.height)
return

One thought I had is to make the clean brick just clear the screen
(and stop any media that is playing) and let the start brick do the
reset. I wonder how many TA programs would break? (And I would have to
make the start brick be able to be connected in line. Currently it
only can be positioned at the top of a pile.)

comment:2 Changed 12 years ago by erikos

  • Milestone changed from Unspecified by Release Team to 0.88

I guess 0.88.

comment:3 Changed 12 years ago by walter

  • Resolution set to wontfix
  • Status changed from new to closed

In discussion, we may not do this at all, since the fill-screen brick will serve the same purpose as clear. A reset brick is still under consideration. Closing for the time being.

comment:4 Changed 8 years ago by dnarvaez

  • Milestone 0.88 deleted

Milestone 0.88 deleted

Note: See TracTickets for help on using tickets.