Graphic Text Module
[General Graphic Module]

Collaboration diagram for Graphic Text Module:


Functions

lcdgraph_result_e LCDGRAPH_GrTextGetWidth (char *string, unsigned int *width)
 Returns ram string's width in pixels.
lcdgraph_result_e LCDGRAPH_GrTextGetWidthpgm (const rom_type char *string, unsigned int *width)
 Returns rom string's width in pixels.
lcdgraph_result_e LCDGRAPH_GrTextSetFont (lcdgraph_font_e font)
 Set font.
lcdgraph_result_e LCDGRAPH_GrTextSetMode (lcdgraph_fontmode_e mode)
 Set text write mode.
lcdgraph_result_e LCDGRAPH_GrTextWriteChar (unsigned int x, unsigned int y, char data, unsigned char *letter_width)
 Writes single character.
lcdgraph_result_e LCDGRAPH_GrTextWriteXY (unsigned int x, unsigned int y, char *string)
 Displays ram string.
lcdgraph_result_e LCDGRAPH_GrTextWriteXYpgm (unsigned int x, unsigned int y, const rom_type char *string)
 Displays rom string.

Function Documentation

lcdgraph_result_e LCDGRAPH_GrTextGetWidth ( char *  string,
unsigned int *  width 
)

Returns ram string's width in pixels.

Author:
Mariusz Murawski
Calculates width (in pixels) of given string (stored in ram) using currently set font

Parameters:
[in] string pointer to string stored in ram that will by analyzed
[out] width pointer to variable that will hold calculated width. The variable will not be cleared in case of any error. Does not have to be zero while invoking this function
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong lcd was selected
LCDGRAPH_FAIL if something went wrong with operation
LCDGRAPH_PARAM_FAIL if any pointer parameter is NULL

lcdgraph_result_e LCDGRAPH_GrTextGetWidthpgm ( const rom_type char *  string,
unsigned int *  width 
)

Returns rom string's width in pixels.

Author:
Mariusz Murawski
Calculates width (in pixels) of given string (stored in rom) using currently set font

Parameters:
[in] string pointer to string stored in rom that will by analyzed
[out] width pointer to variable that will hold calculated width. The variable will not be cleared in case of any error. Does not have to be zero while invoking this function
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong lcd was selected
LCDGRAPH_FAIL if something went wrong with operation
LCDGRAPH_PARAM_FAIL if any pointer parameter is NULL

lcdgraph_result_e LCDGRAPH_GrTextSetFont ( lcdgraph_font_e  font  ) 

Set font.

Author:
Mariusz Murawski
Set font for all graphic text operations

Parameters:
font font type
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD was selected
LCDGRAPH_FAIL if something went wrong with operation

lcdgraph_result_e LCDGRAPH_GrTextSetMode ( lcdgraph_fontmode_e  mode  ) 

Set text write mode.

Author:
Mariusz Murawski
Set mode of text write

Parameters:
mode mode of text write
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD was selected
LCDGRAPH_FAIL if something went wrong with operation

lcdgraph_result_e LCDGRAPH_GrTextWriteChar ( unsigned int  x,
unsigned int  y,
char  data,
unsigned char *  letter_width 
)

Writes single character.

Author:
Mariusz Murawski
Writes single character starting at point (x, y). For more complex purposes it also returns character's width (in pixels)

Parameters:
[in] x coordinates
[in] y coordinates
[in] data character to be displayed
[out] letter_width width of displayed character. Pass NULL if it is out of interest
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD type was selected
LCDGRAPH_FAIL if something went wrong with operation
LCDGRAPH_OUT_OF_SCREEN if coordinates refer to area outside of a screen

lcdgraph_result_e LCDGRAPH_GrTextWriteXY ( unsigned int  x,
unsigned int  y,
char *  string 
)

Displays ram string.

Author:
Mariusz Murawski
Displays ram string starting at point (x, y)

Parameters:
x coordinates
y coordinates
string pointer to ram string to be displayed
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD was selected
LCDGRAPH_FAIL if something went wrong with operation
LCDGRAPH_OUT_OF_SCREEN if coordinates refer to area outside of a screen
LCDGRAPH_PARAM_FAIL if pointer to string is NULL

lcdgraph_result_e LCDGRAPH_GrTextWriteXYpgm ( unsigned int  x,
unsigned int  y,
const rom_type char *  string 
)

Displays rom string.

Author:
Mariusz Murawski
Displays rom string starting at point (x, y)

Parameters:
x coordinates
y coordinates
string pointer to rom string to be displayed
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD was selected
LCDGRAPH_FAIL if something went wrong with operation
LCDGRAPH_OUT_OF_SCREEN if coordinates refer to area outside of a screen
LCDGRAPH_PARAM_FAIL if pointer to a string is NULL

SourceForge.net Logo