
-----------------------------------
Paul
Thu Dec 18, 2003 10:30 pm

growing shrinking circle
-----------------------------------
Im supposed to make this growing and shrinking circle, but when it shrinks, white stripes appear, is there anyway of doing this better?

var xr, yr : int := 0
loop
    xr := 0
    yr := 0
    for a : 1 .. 200
        drawfilloval (maxx div 2, maxy div 2, xr, yr, black)
        xr := xr + 1
        yr := yr + 1
        delay (15)
    end for
    for b : 1 .. 200
        drawfilloval (maxx div 2, maxy div 2, xr, yr, black)
        delay (15)
        drawfilloval (maxx div 2, maxy div 2, xr, yr, white)
        xr := xr - 1
        yr := yr - 1
    end for
end loop
[/code]

-----------------------------------
arhamz
Thu Dec 18, 2003 10:56 pm

here it is
-----------------------------------
Here this will do the trick ( added the View.Update technique )


View.Set("offscreenonly")
var xr, yr : int := 0 
loop 
    xr := 0 
    yr := 0 
    for a : 1 .. 200 
        drawfilloval (maxx div 2, maxy div 2, xr, yr, black) 
        xr := xr + 1 
        yr := yr + 1 
        View.Update
        delay (15) 
    end for 
    for b : 1 .. 200 
        drawfilloval (maxx div 2, maxy div 2, xr, yr, black)
        View.Update 
        delay (15) 
        drawfilloval (maxx div 2, maxy div 2, xr, yr, white) 
        xr := xr - 1 
        yr := yr - 1 
    end for 
end loop 


-----------------------------------
Paul
Thu Dec 18, 2003 11:09 pm

thanx
-----------------------------------
thanx alot

-----------------------------------
Andy
Fri Dec 19, 2003 10:18 am


-----------------------------------
Just use recursion, DUH
