Post by tsh73 on Apr 4, 2022 16:32:30 GMT -5
NOTICE halts drawing before it is done.
(I run it on slow machine (Atom netbook, Win 10 32 bit) - please try and see what you get)
That is, I see only part of drawing before NOTICE
(like, only first part of rectangles, not all (actually a half))
Then I changed box to cirle
I saw even smaller part of initial picture.
After Notice program then it do DELSEGMENT, final result as if all parts get drawn.
If I change NOTICE to WAIT, I see all initial rectangles. (but I never got to Delsegments part)
If I slow things down ( by timer) - I see all initial rectangles.
If I do
I do not think it is desirable behavior
- I think putting NOTICE to temporary stop things to look what got drawn is quite common technique, now you could end with partial picture?
This variant for me does not show a thing before NOTICE, but it you uncomment timer part or do REDRAW before NOTICE you'll see drawing is done, just not shown (yet?)
If you put WAIT after NOTICE initial circles will show after closing NOTICE window.
(I run it on slow machine (Atom netbook, Win 10 32 bit) - please try and see what you get)
That is, I see only part of drawing before NOTICE
(like, only first part of rectangles, not all (actually a half))
Then I changed box to cirle
#1.gb circle(x/2)
I saw even smaller part of initial picture.
After Notice program then it do DELSEGMENT, final result as if all parts get drawn.
If I change NOTICE to WAIT, I see all initial rectangles. (but I never got to Delsegments part)
If I slow things down ( by timer) - I see all initial rectangles.
If I do
#1.gb "redraw"
right before NOTICE, I see all initial rectangles.I do not think it is desirable behavior
- I think putting NOTICE to temporary stop things to look what got drawn is quite common technique, now you could end with partial picture?
This variant for me does not show a thing before NOTICE, but it you uncomment timer part or do REDRAW before NOTICE you'll see drawing is done, just not shown (yet?)
If you put WAIT after NOTICE initial circles will show after closing NOTICE window.
' draw some boxes
dim color$(6)
color$(1) = "red"
color$(2) = "brown"
color$(3) = "yellow"
color$(4) = "green"
color$(5) = "blue"
color$(6) = "dark"
count = 1
vector = 1
graphicbox #1.gb, 10, 10, 300, 320
open "Boxes" for window as #1
#1.gb cls("black")
#1.gb flush()
#1.gb place(130,130)
for x = 30 to 230 step 5
'#1.gb color(color$(count))
#1.gb "color ";color$(count)
count = count + vector
if count = 1 and vector < 0 then vector = 1
if count = 6 then vector = -1
'#1.gb circle(x/2)
'#1.gb box(x,260 - x)
print #1.gb, box$(x,260 - x)
#1.gb flush()
'print x
'timer 200, [nx]
'wait
'[nx]
'timer 0
next x
'wait
'#1.gb "redraw"
notice "Click to continue"
'remove every other box and redraw
segId = #1.gb segment()
for x = 2 to segId step 2
#1.gb delsegment(x)
next x
#1.gb redraw()
wait
close #1
function box$(x,y)
box$="circle ";x/2
end function