I'm planing to do a Gui front end for ucblogo.
My problem is that I can't turn the turtle on directly on it's axis
In the following example I wan't to turn in 90 degrees the blue turtle but
keeping it on the center of the screen:
#---------------- CUT HERE ----------------------
from gtk import *
from gnome.ui import *
import gnome.affine
win = GtkWindow()
win.connect('destroy', mainquit)
win.set_title('logo')
canvas = GnomeCanvas(aa=TRUE)
canvas.set_usize(00, 100)
win.add(canvas)
canvas.show()
root = canvas.root()
turtle = root.add('group')
line1 = turtle.add('line', points=(45,55, 55,55, 50,40, 45,55),
width_pixels=1, fill_color='blue')
turned_turtle = root.add('group')
line2 = turned_turtle.add('line', points=(45,55, 55,55, 50,40, 45,55),
width_pixels=1, fill_color='red')
line2.affine_absolute(gnome.affine.rotate(degrees=90))
win.show()
mainloop()
#---------------- CUT HERE ----------------------
I now I a very basic question, but I think I've read enougth
documentation.
Thanks !!!
Daniel Kornhauser
P.S:
By the way I plan "connect" with ucblogo the following way :
I replace the xterm graphic functions with prints lite this:
Welcome to Berkeley Logo version 4.6
? fd 1
save_pen 1
plain_xor_pen
set_pen_width 1
set_pen_height 1
move_to 57 51
line_to 45 51
line_to 51 32
line_to 57 51
etc....
I think I'll catch them with a pipe and execute the corresponding
functions in a logo canvas.
Is it to dirty for a prototype !?!?
Should a try a more clean way of embedding or encapsulating!?!?!?
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]