|
From: sccs c. <zo...@ya...> - 2007-10-25 07:47:02
|
Hello,
I have a strange behaviour of the 'label' visaul class:
if i draw a label that is linked to a form, i shall draw it 2 times until it is displayed correctly: The label is not on the sphere the first time, and i shall wait (sleep(1)) before redrawing the label. Then the label is correctly drawn.
import visual
from time import sleep
def draw_label():
visual.label (frame = form,
pos = (0, 0, 0),
text = "(%.2f, %.2f,%.2f)"%(x0, y0, z0),
opacity = 0,
box = 0,
color = visual.color.red)
x0 = 2
y0 = 2
z0 = 10
visual.sphere (radius = 2, pos = (0, 0, 0), color = visual.color.yellow)
form = visual.frame(name ="Guide")
form.pos = (x0, y0, z0)
visual.sphere (frame = form, radius = 1, pos = (0, 0, 0))
draw_label()
sleep(1)
print "redraw!"
draw_label()
Thank you for your help.
Zorgi
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |