Character Drawing - TBTerra/pictor GitHub Wiki
The functions used for drawing text, these functions require a font to be included in order to be used.
void pictorDrawC(const unsigned char Char, const point Pos, const uint16_t ForegroundColour, const uint16_t BackgroundColour, const font * Font, uint8_t scale);Draws a character onto the screen at the specified position with a set font, and foreground and background colours.
Parameters:
- 
Char- Character to be written to the screen.
- 
Pos- Point structure to the top-left corner of the character's intended location.
- 
ForegroundColour- Colour of the character as a 656-RGB encoded colour.
- 
BackgroundColour- Colour of the background as a 656-RGB encoded colour.
- 
Font- Pointer to the font array to be used for the character.
- 
scale- Integer character size scale (Note: a scale of 1 gives a character 8 pixels tall by 8 pixels wide).
uint8_t pictorDrawS(const unsigned char * Buffer, point Pos, const uint16_t ForegroundColour, const uint16_t BackgroundColour, const font * Font, uint8_t scale);Draws a string onto the screen at the specified position with a set font, and foreground and background colours.
Parameters:
- 
Buffer- String to be written to the screen.
- 
Pos- Point structure to the top-left corner of the characters' intended location.
- 
ForegroundColour- Colour of the characters as a 656-RGB encoded colour.
- 
BackgroundColour- Colour of the background as a 656-RGB encoded colour.
- 
Font- Pointer to the font array to be used for the characters.
- 
scale- Integer character size scale (Note: a scale of 1 gives a character 8 pixels tall by 8 pixels wide).
Return Value:
- Number of characters written to the screen.
uint8_t pictorDrawSP(const unsigned char * Buffer, point Pos, const uint16_t ForegroundColour, const uint16_t BackgroundColour, const font * Font, uint8_t scale);Draws a string from program memory onto the screen at the specified position with a set font, and foreground and background colours.
Parameters:
- 
Buffer- String to be written to the screen.
- 
Pos- Point structure to the top-left corner of the characters' intended location.
- 
ForegroundColour- Colour of the characters as a 656-RGB encoded colour.
- 
BackgroundColour- Colour of the background as a 656-RGB encoded colour.
- 
Font- Pointer to the font array to be used for the characters.
- 
scale- Integer character size scale (Note: a scale of 1 gives a character 8 pixels tall by 8 pixels wide).
Return Value:
- Number of characters written to the screen.