I'm not sure if its the same, but in an old script language I used, it changed the color of the pixels (changing some bytes) of the buffer bitmap (double-buffering).
for two boxes that create an outline (size 300x300):
for a=1 to 300
for b=1 to 300
ink #FFFFFF
pix a,b
next b
next a
for a=2 to 299
for b=2 to 299
ink #000000
pix a,b
next b
next a
This is the code my old language used, its the same as:
ink rgb(255,255,255),rgb(255,255,255)
box 1,1,300,300
ink rgb(0,0,0),rgb(0,0,0)
box 2,2,299,299
We can calculate how many times he changes the color of the pixels:
1 to 300 = 300
1 to 300 = 300 x
----------------
.........90000 times
2 to 299 = 298
2 to 299 = 298 x
----------------
.........88804 times
90000 + 88804 = 178804 changes
For 4 lines (same result):
Line 1,1,1,300
line 1,1,300,1
line 300,1,1,300
line 1,300,300,300
again, the calculation:
300 + 300 + 300 + 300 = 1200 changes.
Im not sure if darkbasic is doing this, but it surely speed up things by using 4 lines instead of 2 boxes in that old script language
Quote: "
UPDATED
Amd 2800+
1024mb pc3200
A7N8X - Deluxe
Ati Radeon 9800PRO 256mb"