Mikroelektronika MIKROE-742 데이터 시트
SPI_Glcd_Rectangle
SPI_Glcd_Box
408
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure SPI_Glcd_Rectangle(x_upper_left : byte; y_upper_left :
byte; x_bottom_right : byte; y_bottom_right : byte; color : byte);
byte; x_bottom_right : byte; y_bottom_right : byte; color : byte);
Returns
Nothing.
Description
Draws a rectangle on Glcd.
Parameters :
-
x_upper_left
: x coordinate of the upper left rectangle corner. Valid values:
0..127
-
y_upper_left
: y coordinate of the upper left rectangle corner. Valid values:
0..63
-
x_bottom_right
: x coordinate of the lower right rectangle corner. Valid val
ues: 0..127
-
y_bottom_right
: y coordinate of the lower right rectangle corner. Valid val
ues: 0..63
-
color
: color parameter. Valid values: 0..2
The parameter color determines the color of the rectangle border: 0 white, 1
black, and 2 inverts each dot.
black, and 2 inverts each dot.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routines.
Example
// Draw a rectangle between dots (5,5) and (40,40)
SPI_Glcd_Rectangle(5, 5, 40, 40, 1);
SPI_Glcd_Rectangle(5, 5, 40, 40, 1);
Prototype
procedure SPI_Glcd_Box(x_upper_left : byte; y_upper_left : byte;
x_bottom_right : byte; y_bottom_right : byte; color : byte);
x_bottom_right : byte; y_bottom_right : byte; color : 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.
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);