here ... to see a centered image... and with multiple color...to see that it work..for anything..
sync on
hide mouse
ink rgb(0,255,0),0
box 280,200,360,280
ink rgb(255,0,0),0
for i=1 to 30
long#=i/2
circle 300,220,long#/2.0
circle 340,220,long#/2.0
next i
box 300,240,340,260
sync
load dll "user32.dll",1
load dll "gdi32.dll",2
hWnd = call dll(1,"GetActiveWindow")
hDC = call dll(1,"GetWindowDC",hWnd)
dim Color(640,480)
for i=1 to 640
for j=1 to 480
Color(i,j)=call dll(2,"GetPixel",hDC,i,j)
next j
next i
`Change "Detail#" for the quality of the texture... 1 will be lowest... 4 is a good number.. not too slow..
Detail#=4
degre#=10.0
create bitmap 1,640,480
do
set current bitmap 1
cls 0
for i=1 to 200
for j=1 to (detail#*360)
i1#=i
j1#=j/detail#
Px=320.0+(i1#*cos(j1#))
Py=240.0-(i1#*sin(j1#))
color1=Color(px,py)
Px=320.0+(i1#*cos(j1#+Degre#))
Py=240.0-(i1#*sin(j1#+Degre#))
ink rgb(rgbb(color1),rgbg(color1),rgbr(color1)),0
dot Px,Py
next j
next i
degre#=degre#+10
get image 1,0,0,640,480
set current bitmap 0
cls 0
paste image 1,0,0
sync
loop