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. | |
| lcdgraph_result_e LCDGRAPH_GrTextGetWidth | ( | char * | string, | |
| unsigned int * | width | |||
| ) |
Returns ram string's width in pixels.
Calculates width (in pixels) of given string (stored in ram) using currently set font
| [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 |
| 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.
Calculates width (in pixels) of given string (stored in rom) using currently set font
| [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 |
| 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.
Set font for all graphic text operations
| font | font type |
| 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.
Set mode of text write
| mode | mode of text write |
| 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.
Writes single character starting at point (x, y). For more complex purposes it also returns character's width (in pixels)
| [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 |
| 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.
Displays ram string starting at point (x, y)
| x | coordinates | |
| y | coordinates | |
| string | pointer to ram string to be displayed |
| 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.
Displays rom string starting at point (x, y)
| x | coordinates | |
| y | coordinates | |
| string | pointer to rom string to be displayed |
| 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 |