ezLCD+103 Driver  0.1
Driver code for the ezLCD+103
 All Files Functions Typedefs Enumerations Groups Pages
Functions
Lines

Functions

void ezLCD_draw_line (int16_t x, int16_t y)
 
void ezLCD_draw_h_line (int16_t x)
 
void ezLCD_draw_v_line (int16_t y)
 

Detailed Description

This header file contains function prototypes for drawing lines on the ezLCD+103. It includes a generic line-drawing function prototype which works for lines of all slopes as well as fast line-drawing function prototypes for horizontal and vertical lines.

NOTE: it is OK for the user to draw a line off the screen (either in the positive or negative direction with endpoints in the set of [-32768,32767]). This may be useful to some users as the manufacturer touts this as a feature of the display; hence none of these functions perform bounds checking in order to maintain this feature.

Function Documentation

void ezLCD_draw_h_line ( int16_t  x)

This function is used to draw horizontal lines only to the screen. If the user needs to draw a horizontal line, this function is preferred to conserve system resources. The function draws a line between the current position. and the provided X coordinate. The current position is then updated to the provided X coordinate.

Parameters
  • x = X coordinate of the line's endpoint; in the set of [-32768,32767].
Assumptions
  • The user has appropriately set the current position using the ezLCD_set_xy() function or another function which alters the current position.
  • The user has set a desired pen size with ezLCD_set_pen_size() or is willing to use the most recently set pen size.
  • The user has chosen a line color with the ezLCD_set_color_rgb() function or is willing to use the most recently set color.
void ezLCD_draw_line ( int16_t  x,
int16_t  y 
)

This function is used to draw generic lines of any slope to the screen. If the user is only drawing horizontal or vertical lines, it is advised to use one of the other two functions in this file respectively to conserve system resources. The function draws a line between the current position. and the provided XY coordinate. The current position is then updated to the provided XY coordinate.

Parameters
  • x = X coordinate of the line's endpoint; in the set of [-32768,32767].
  • y = Y coordinate of the line's endpoint; in the set of [-32768,32767].
Assumptions
  • The user has appropriately set the current position using the ezLCD_set_xy() function or another function which alters the current position.
  • The user has set a desired pen size with ezLCD_set_pen_size() or is willing to use the most recently set pen size.
  • The user has chosen a line color with the ezLCD_set_color_rgb() function or is willing to use the most recently set color.
void ezLCD_draw_v_line ( int16_t  y)

This function is used to draw vertical lines only to the screen. If the user needs to draw a vertical line, this function is preferred to conserve system resources. The function draws a line between the current position. and the provided Y coordinate. The current position is then updated to the provided Y coordinate.

Parameters
  • y = Y coordinate of the line's endpoint; in the set of [-32768,32767].
Assumptions
  • The user has appropriately set the current position using the ezLCD_set_xy() function or another function which alters the current position.
  • The user has set a desired pen size with ezLCD_set_pen_size() or is willing to use the most recently set pen size.
  • The user has chosen a line color with the ezLCD_set_color_rgb() function or is willing to use the most recently set color.