
-----------------------------------
bvbjules13
Wed Nov 21, 2012 7:40 pm

View.Update?
-----------------------------------
What is it you are trying to achieve?
I am trying to make an animation

What is the problem you are having?
when the figure reaches near the end of the screen the animation drags, the rest of the animation if fine though. The animation in the code i have posted is a circle moving, but when it is almost off the screen it just stops, in other programs iv made to test this, they dragged, it seems that the animation is not getting cleared from the screen properly or something but i don't know

Describe what you have tried to solve this problem
used View.UpdateArea also





View.Set ("graphics, offscreenonly")
var x : int := 50

loop
x := x+1
Time.Delay (10)
Draw.Fill (x, 50, 0, 0)
Draw.FillOval (x, 50, 50, 50, 16)
View.UpdateArea (0, 0, maxx, maxy)
end loop


Please specify what version of Turing you are using
Version 4.1

-----------------------------------
Dreadnought
Wed Nov 21, 2012 7:50 pm

Re: View.Update?
-----------------------------------
What does [tdoc]Draw.Fill[/tdoc] do?

-----------------------------------
bvbjules13
Wed Nov 21, 2012 7:55 pm

Re: View.Update?
-----------------------------------
it allows the circle to dissapear, i cant use cls b/c in my other programs there are other parts of the screen i need on

-----------------------------------
Insectoid
Wed Nov 21, 2012 8:11 pm

RE:View.Update?
-----------------------------------
So you should be re-drawing only those areas using View.UpdateArea(). You're already doing that, except you're using it to update the whole screen instead of just one small spot. Alternatively (and preferably), just re-draw everything instead of just the circle.

-----------------------------------
Dreadnought
Wed Nov 21, 2012 8:11 pm

Re: View.Update?
-----------------------------------

The Draw.Fill procedure is used to color in a figure that is on the screen.

Suppose we pass an (x, y) point to Draw.Fill that is NOT on the screen. What should happen then?

-----------------------------------
bvbjules13
Wed Nov 21, 2012 8:15 pm

Re: RE:View.Update?
-----------------------------------
So you should be re-drawing only those areas using View.UpdateArea(). You're already doing that, except you're using it to update the whole screen instead of just one small spot. Alternatively (and preferably), just re-draw everything instead of just the circle.

still doesnt seem to be working for me  :(

-----------------------------------
bvbjules13
Wed Nov 21, 2012 8:16 pm

Re: View.Update?
-----------------------------------

The Draw.Fill procedure is used to color in a figure that is on the screen.

Suppose we pass an (x, y) point to Draw.Fill that is NOT on the screen. What should happen then?

will not draw anything...oh i see....that actually makes sense now to why it didnt work....

-----------------------------------
bvbjules13
Wed Nov 21, 2012 8:20 pm

Re: View.Update?
-----------------------------------
Dreadnought thank you for your help :)

-----------------------------------
Dreadnought
Wed Nov 21, 2012 8:25 pm

Re: View.Update?
-----------------------------------
No problem. :)
