Hi Guys
I am trying to use getpixel on android but it returns zero with my virtual screen using USESCREEN -1 for my virtual screen.
Anyone got an alternative ?
Okay, this is sorted now - made my own color picker in the end by just creating the colours with code
:)
TYPE colsect
x=0
y=0
col% = 0
ENDTYPE
GLOBAL colsects[] AS colsect
LOCAL cx = 0
LOCAL cy = 0
LOCAL counter=0
FOR r= 255 TO 0 STEP -64
FOR g=255 TO 0 STEP -63
FOR b = 255 TO 0 STEP -63
LOCAL cc AS colsect
cc.col = RGB(r,g,b)
cc.x = cx
cc.y = counter*10
DIMPUSH colsects[],cc
INC counter,1
IF counter = 9
counter = 0
INC cx,10
ENDIF
NEXT
NEXT
NEXT
In the past i have used spritetomem() and then accessed the array as if it were the screen.
As im aware GETPIXELS might not work on all platforms. Im thinks its due Android uses 16bit colors, not 24.
GETPIXEL also doesn't work in several versions of GLBasic on a number of formats, not just Android. v10 worked on OK on most/all platforms IIRC.
Thanks Guys,
I got it sorted anyhow - GETPIXEL was a lazy way out for me, but the best solutions is the one I coded - which can't go wrong on any device... So likely much better off with the work around :)