Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
SPI_Glcd_Box
SPI_Glcd_Circle
398
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure SPI_Glcd_Box(dim x_upper_left as bytedim
y_upper_left 
as bytedim x_bottom_right as bytedim
y_bottom_right 
as bytedim color as byte)
Returns
Nothing.
Description
Draws a box on Glcd.
Parameters : 
x_upper_left:
x coordinate of the upper left box corner. Valid values: 0..127 
y_upper_left:
y coordinate of the upper left box corner. Valid values: 0..63 
x_bottom_right:
x coordinate of the lower right box corner. Valid values: 0..127 
y_bottom_right:
y coordinate of the lower right box corner. Valid values: 0..63 
color:
color parameter. Valid values: 0..2 
The parameter 
color
determines the color of the box fill: 0 white, 1 black, and 2
inverts each dot.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routines.
Example
' Draw a box between dots (5,15) and (20,40)
SPI_Glcd_Box(5, 15, 20, 40, 1)
Prototype
sub procedure SPI_Glcd_Circle(dim x_center as integerdim y_cen-
ter 
as integerdim radius as integerdim color as byte)
Returns
Nothing.
Description
Draws a circle on Glcd.
Parameters : 
x_center:
x coordinate of the circle center. Valid values: 0..127 
y_center:
y coordinate of the circle center. Valid values: 0..63 
radius:
radius size 
color:
color parameter. Valid values: 0..2 
The parameter 
color
determines the color of the circle line: 0 white, 1 black,
and 2 inverts each dot.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routine.
Example
' Draw a circle with center in (50,50) and radius=10
SPI_Glcd_Circle(50, 50, 10, 1)