 |
Author |
Topic: Newbe problem whit rotate, translate (Read 239 times) |
|
Z3r0Fr0z3
|
Newbe problem whit rotate, translate
« on: Oct 24th, 2004, 2:18pm » |
|
Hi. I newer programmed before. I'm tring to wrote a litle program to lern something, but i have a problem whit rotate ad translate comand. It seemes that the previus comand influence the next one, so i can't make my clock works. this is the program link http://digilander.libero.it/ZeroFroze/ZF_TIME.html Help me please. I'm sorry for my poor english but i'm from italy.
|
|
|
|
fjen
|
Re: Newbe problem whit rotate, translate
« Reply #1 on: Oct 24th, 2004, 3:44pm » |
|
just include push() and pop() into your functions (seconds, minutes, hours) like this: void Minuti() { int m = minute(); fill (0); push(); translate((width/2)-4,height/2); rotate (radians(6*m)); rect (0,0,8,-160); pop(); } push, pop: http://processing.org/reference/push_.html /F
|
|
|
|
Z3r0Fr0z3
|
Re: Newbe problem whit rotate, translate
« Reply #2 on: Oct 24th, 2004, 4:10pm » |
|
Ok now it works fine. Tanks.
|
|
|
|
|