Re: HP Prime - GETPIX_P Return? Message #2 Posted by Patrice on 24 Nov 2013, 7:54 a.m., in response to message #1 by Thomas Chrapkiewicz
The color coding is the one of html.
Only 5 bits in each chanel are used. Thus the 3 lower bits in each chanel stay to 0.
EXPORT SHOW_CLR()
BEGIN
LOCAL cr, cg, cb, clr, pc, pl;
RECT();
FOR cr FROM 0 TO 31 DO
pl:= cr MOD 8* 34;
pc:= IP(cr/8)* 34;
FOR cg FROM 0 TO 31 DO
FOR cb FROM 0 TO 31 DO
clr:= RGB(cr*8,cg*8,cb*8);
PIXON_P(cb+pl+2,cg+pc+2,clr);
END;
END;
END;
REPEAT
UNTIL GETKEY() == -1;
FREEZE;
END;
|