396
Platforms
©2000-2008 Tibbo Technology Inc.
middle of the display:
Dim
color_green
As
word
...
lcd_green=val("&b"+strgen(lcd.greenbits/&hFF,"1")+strgen(lcd.greenbits
And
&hFF,"0"))
lcd.setpixel(lcd_green,lcd.width/2,lcd.height/2)
Lcd.setpixel is the only method that accepts the color directly. All other methods
rely on two color properties:
and
. Each property is
a 16-bit value, just like the one used by the lcd.setpixel. The forecolor is the color
of the "drawing pen", and the backcolor is the color of the background. In the
following example, we set the lcd.forecolor to the brightest color available, and the
lcd.backcolor to the darkest color available:
lcd.forecolor=&hFFFF
lcd.backcolor=0
The following methods are provided to output data onto the screen, and they all
use the lcd.forecolor and, where necessary, the lcd.backcolor:
,
,
-- the line is drawn using the forecolor.
-- the border is drawn using the forecolor, the internal area of
the rectangle is not filled.
-- the border is drawn using the forecolor, the internal area
is filled with the backcolor.
-- the entire area is filled with the forecolor.
and
-- print text, where each "on" dot of each
character is displayed in forecolor, while each "off" dot is displayed in backcolor.
The following two sections --
, and
-- discuss the above methods in more details.
Lines, Rectangles, and Fills
Lines
419
414
422
432
421
427
418
417
425
426
396
397