DebugPrinter
The class DebugPrinter defines the interface for printing debug messages on top of the framebuffer.
Inherited by: LCD16DebugPrinter, LCD1DebugPrinter, LCD24DebugPrinter, LCD2DebugPrinter, LCD32DebugPrinter, LCD4DebugPrinter, LCD8ABGR2222DebugPrinter, LCD8ARGB2222DebugPrinter, LCD8BGRA2222DebugPrinter, LCD8RGBA2222DebugPrinter
Public Functions
DebugPrinter() | |
Initializes a new instance of the DebugPrinter class. | |
virtual void | draw(const Rect & rect) const =0 |
Draws the debug string on top of the framebuffer content. | |
const Rect & | getRegion() const |
Returns the region where the debug string is displayed. | |
void | setColor(colortype fg) |
Sets the foreground color of the debug string. | |
void | setPosition(uint16_t x, uint16_t y, uint16_t w, uint16_t h) |
Sets the position onscreen where the debug string will be displayed. | |
void | setScale(uint8_t scale) |
Sets the font scale of the debug string. | |
void | setString(const char * string) |
Sets the debug string to be displayed on top of the framebuffer. | |
virtual | ~DebugPrinter() |
Finalizes an instance of the DebugPrinter class. | |
Protected Functions
uint16_t | getGlyph(uint8_t c) const |
Gets a glyph (15 bits) arranged with 3 bits wide, 5 bits high in a single uint16_t value. | |
Protected Attributes
colortype | debugForegroundColor |
Font color to use when displaying the debug string. | |
Rect | debugRegion |
Region onscreen where the debug message is displayed. | |
uint8_t | debugScale |
Font scaling factor to use when displaying the debug string. | |
const char * | debugString |
Debug string to be displayed onscreen. | |
Public Functions Documentation
DebugPrinter
Initializes a new instance of the DebugPrinter class.
draw
Draws the debug string on top of the framebuffer content.
rect | The rect to draw inside. |
Reimplemented by: touchgfx::LCD16DebugPrinter::draw, touchgfx::LCD1DebugPrinter::draw, touchgfx::LCD24DebugPrinter::draw, touchgfx::LCD2DebugPrinter::draw, touchgfx::LCD32DebugPrinter::draw, touchgfx::LCD4DebugPrinter::draw, touchgfx::LCD8ABGR2222DebugPrinter::draw, touchgfx::LCD8ARGB2222DebugPrinter::draw, touchgfx::LCD8BGRA2222DebugPrinter::draw, touchgfx::LCD8RGBA2222DebugPrinter::draw
getRegion
const Rect & getRegion | ( | ) | const |
setColor
Sets the foreground color of the debug string.
fg | The foreground color of the debug string. |
setPosition
void setPosition | ( | uint16_t | x , | ||
uint16_t | y , | ||||
uint16_t | w , | ||||
uint16_t | h | ||||
) |
Sets the position onscreen where the debug string will be displayed.
x | The coordinate of the region where the debug string is displayed. |
y | The coordinate of the region where the debug string is displayed. |
w | The width of the region where the debug string is displayed. |
h | The height of the region where the debug string is displayed. |
setScale
void setScale | ( | uint8_t | scale | ) | |
Sets the font scale of the debug string.
scale | The font scale of the debug string. |
setString
void setString | ( | const char * | string | ) | |
Sets the debug string to be displayed on top of the framebuffer.
string | The string to be displayed. |
~DebugPrinter
virtual ~DebugPrinter | ( | ) |
Finalizes an instance of the DebugPrinter class.
Protected Functions Documentation
getGlyph
uint16_t getGlyph | ( | uint8_t | c | ) | |
Gets a glyph (15 bits) arranged with 3 bits wide, 5 bits high in a single uint16_t value.
c | The character to get a glyph for. |
The glyph.
Protected Attributes Documentation
debugForegroundColor
colortype debugForegroundColor
Font color to use when displaying the debug string.
debugRegion
Rect debugRegion
Region onscreen where the debug message is displayed.
debugScale
uint8_t debugScale
Font scaling factor to use when displaying the debug string.
debugString
const char * debugString
Debug string to be displayed onscreen.