This code will display a nice color wheel in Windows 7, but shows a nice (but unwanted) Android white square
Any ideas?
Thank you!
GLOBAL mysprite%=5
main:
RuedaCrear(8,200,200,100,100,RGB(255,255,0))
DRAWSPRITE mysprite, 100,100
SHOWSCREEN
MOUSEWAIT
END
FUNCTION RuedaCrear: Count,x, y, w, h, col%
//INC x, w/2
//INC y, h/2
LOCAL parteengrados# = (360/(Count))
LOCAL phi
CLEARSCREEN 0//RGB(255,100,100)
ALPHAMODE 0
STARTPOLY -1, 0
POLYVECTOR x,y, 0,0,col
FOR phi = 0 TO 360 //STEP 5 // how poly do you want it?
IF phi>0 AND phi<360 AND MOD(phi,parteengrados)=0
col = RGB(RND(255),RND(255),RND(255))
ENDIF
POLYVECTOR x+COS(phi)*w, y-SIN(phi)*h, 0,0,col
NEXT
ENDPOLY
GRABSPRITE mysprite, x-w, y-h, w*2, h*2
//
// SHOWSCREEN
// MOUSEWAIT
// END
ENDFUNCTION
GRABSPRITE is one of those "issue" commands on certain devices that doesnt work as predicted. The work around for this is to use CREATESCREEN
Thank you; I will try ir this night.
Enviado desde mi GT-I9001 usando Tapatalk 2
CREATESCREEN works well!
Yes! Now it works fine on Android! Thank you :DGLOBAL mysprite%=5
main:
RuedaCrear(8,100,100,100,100,RGB(255,255,0))
DRAWSPRITE mysprite, 100,100
SHOWSCREEN
MOUSEWAIT
END
FUNCTION RuedaCrear: Count,x, y, w, h, col%
CREATESCREEN 0, mysprite, (w)*2, (h)*2
USESCREEN 0
//INC x, w/2
//INC y, h/2
LOCAL parteengrados# = (360/(Count))
LOCAL phi
CLEARSCREEN 0//RGB(255,100,100)
ALPHAMODE 0
STARTPOLY -1, 0
POLYVECTOR x,y, 0,0,col
FOR phi = 0 TO 360 //STEP 5 // how poly do you want it?
IF phi>0 AND phi<360 AND MOD(phi,parteengrados)=0
col = RGB(RND(255),RND(255),RND(255))
ENDIF
POLYVECTOR x+COS(phi)*w, y-SIN(phi)*h, 0,0,col
NEXT
ENDPOLY
USESCREEN -1
ENDFUNCTION