sGUI  V1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Text

Draw simple characters or full lines. More...

+ Collaboration diagram for Text:

Files

file  text.c
 Simple graphic library draw text functionality.
Draw simple characters or full lines.
 

Functions

static void LCD_DrawChar (uint16_t Xpos, uint16_t Ypos, LCDCOLOR BackColor, LCDCOLOR TextColor, FONT_T *Font, void *ptr)
 Draws a character on LCD. More...
 
void LCD_SetTextColor (LCDCOLOR Color)
 Sets the Text color. More...
 
void LCD_SetBackColor (LCDCOLOR Color)
 Sets the Background color. More...
 
void LCD_SetFont (FONT_T *Font)
 Sets the current font. More...
 
FONT_TLCD_GetFont (void)
 Gets the current font. More...
 
uint8_t LCD_GetLineCount (void)
 Gets the current count of possible lines. More...
 
void LCD_ClearLine (uint8_t Line)
 Clears the selected line. More...
 
void LCD_DisplayCharXY (uint16_t x, uint16_t y, char Ascii)
 Displays one character (16dots width, 24dots height) on the LCD. Position is set with a x- and a y-coordinate. More...
 
void LCD_DisplayCharLine (uint8_t Line, uint8_t Column, char Ascii)
 Displays one character (16dots width, 24dots height) on the LCD. Position is set with a line and a column. More...
 
void LCD_DisplayStringXY (uint16_t x, uint16_t y, const char *ptr)
 Displays a string on the LCD. Position is set with the x- and y-coordinate. More...
 
void LCD_DisplayStringLine (uint8_t Line, const char *ptr)
 Displays a string on a line on the LCD. Position is set with a line number. More...
 
void LCD_DisplayStringCenterLine (uint8_t Line, const char *ptr)
 Displays a string on the LCD. Position is set at the y-coordinate on center of the display. More...
 

Variables

static LCDCOLOR TextColor = 0xFFFF
 Color of the text.
 
static LCDCOLOR BackColor = 0x0000
 Color of the background.
 
static FONT_TCurrentFont = &font_5x8
 Current font.
 

Detailed Description

Draw simple characters or full lines.

Function Documentation

void LCD_ClearLine ( uint8_t  Line)

Clears the selected line.

Parameters
[in]LineThe Line to be cleared. This parameter can be one of the following values:
  • Linex: where x can be 0..9

Definition at line 186 of file text.c.

+ Here is the call graph for this function:

void LCD_DisplayCharLine ( uint8_t  Line,
uint8_t  Column,
char  Ascii 
)

Displays one character (16dots width, 24dots height) on the LCD. Position is set with a line and a column.

Parameters
[in]LineThe Line where to display the character shape. This parameter can be one of the following values:
  • Linex: where x can be 0..9
[in]ColumnStart column address.
[in]AsciiCharacter ascii code, must be between 0x20 and 0x7E.

Definition at line 223 of file text.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LCD_DisplayCharXY ( uint16_t  x,
uint16_t  y,
char  Ascii 
)

Displays one character (16dots width, 24dots height) on the LCD. Position is set with a x- and a y-coordinate.

Parameters
[in]xX-Position in pixel
[in]yY-Position in pixel
[in]AsciiCharacter ascii code, must be between 0x20 and 0x7E.

Definition at line 199 of file text.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LCD_DisplayStringCenterLine ( uint8_t  Line,
const char *  ptr 
)

Displays a string on the LCD. Position is set at the y-coordinate on center of the display.

Parameters
[in]LineThe Line where to display the character shape.
[in]*ptrPointer to string to display on LCD.
Examples:
bitmap.c, and geometry.c.

Definition at line 288 of file text.c.

+ Here is the call graph for this function:

void LCD_DisplayStringLine ( uint8_t  Line,
const char *  ptr 
)

Displays a string on a line on the LCD. Position is set with a line number.

Parameters
[in]LineThe Line where to display the character shape.
[in]*ptrPointer to string to display on LCD.

Definition at line 250 of file text.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LCD_DisplayStringXY ( uint16_t  x,
uint16_t  y,
const char *  ptr 
)

Displays a string on the LCD. Position is set with the x- and y-coordinate.

Parameters
[in]xX-Position in pixel
[in]yY-Position in pixel
[in]*ptrPointer to string to display on LCD.

Definition at line 236 of file text.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void LCD_DrawChar ( uint16_t  Xpos,
uint16_t  Ypos,
LCDCOLOR  BackColor,
LCDCOLOR  TextColor,
FONT_T Font,
void *  ptr 
)
static

Draws a character on LCD.

Parameters
[in]XposSpecifies the X position.
[in]YposSpecifies the Y position.
[in]BackColorSpecifies the Background color code RGB(5-6-5).
[in]TextColorSpecifies the Text color code RGB(5-6-5).
[in]FontFonttype to use font.h.
[in]ptrPointer to the character data.

Definition at line 113 of file text.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FONT_T* LCD_GetFont ( void  )

Gets the current font.

Returns
Pointer to the current font.

Definition at line 168 of file text.c.

uint8_t LCD_GetLineCount ( void  )

Gets the current count of possible lines.

Returns
Number of possible lines.

Definition at line 176 of file text.c.

+ Here is the caller graph for this function:

void LCD_SetBackColor ( LCDCOLOR  Color)

Sets the Background color.

Parameters
[in]Colorspecifies the Background color code RGB(5-6-5).

Definition at line 152 of file text.c.

void LCD_SetFont ( FONT_T Font)

Sets the current font.

Parameters
[in]Fontspecifies the font array.
Examples:
bitmap.c, geometry.c, and log.c.

Definition at line 160 of file text.c.

void LCD_SetTextColor ( LCDCOLOR  Color)

Sets the Text color.

Parameters
[in]Colorspecifies the Text color code RGB(5-6-5).

Definition at line 144 of file text.c.