User manual

Table Of Contents
574
mikoC PRO for PIC32
MikroElektronika
TFT_H_Line
TFT_V_Line
Prototype
void TFT_H_Line(int x_start, int x_end, int y_pos);
Returns Nothing.
Description Draws a horizontal line on TFT.
Parameters:
- x_start: x coordinate of the line start.
- x_end: x coordinate of the line end.
- y_pos: y coordinate of horizontal line.
Requires TFT module needs to be initialized. See the TFT_Init routine.
Example
// Draw a horizontal line between dots (10,20) and (50,20)
TFT_H_Line(10, 50, 20);
Prototype
void TFT_V_Line(int y_start, int y_end, int x_pos);
Returns Nothing.
Description Draws a vertical line on TFT.
Parameters:
- y_start: y coordinate of the line start.
- y_end: y coordinate of the line end.
- x_pos: x coordinate of vertical line.
Requires TFT module needs to be initialized. See the TFT_Init routine.
Example
// Draw a vertical line between dots (10,5) and (10,25)
TFT_V_Line(5, 25, 10);
TFT_Rectangle
Prototype
void TFT_Rectangle(int x_upper_left, int y_upper_left, int x_bottom_right,
int y_bottom_right);
Returns Nothing.
Description Draws a rectangle on TFT.
Parameters:
- x_upper_left: x coordinate of the upper left rectangle corner.
- y_upper_left: y coordinate of the upper left rectangle corner.
- x_bottom_right: x coordinate of the lower right rectangle corner.
- y_bottom_right: y coordinate of the lower right rectangle corner.
Requires TFT module needs to be initialized. See the TFT_Init routine.
Example
TFT_Rectangle(20, 20, 219, 107);