23 static const uint8_t
width = EV3_LCD_WIDTH;
24 static const uint8_t
height = EV3_LCD_HEIGHT;
26 static const bool_t
white = EV3_LCD_WHITE;
27 static const bool_t
black = EV3_LCD_BLACK;
63 char const *pattern) {
77 }
else if(ch ==
'\t') {
81 }
else if(ch ==
'\r') {
96 ev3_lcd_draw_character(ch,
m_x,
m_y);
123 void setTextLine(uint8_t line, int32_t x_offset = 0,
bool clear =
true) {
140 void clearTextLine(uint8_t line, bool_t color = white, int32_t x_offset = 0, int32_t line_length = 0) {
141 if (line_length == 0)
142 line_length = width - x_offset;
145 ev3_lcd_fill_rect(x_offset,
149 static_cast<lcdcolor_t>(color));
158 ev3_lcd_fill_rect(0, 0, width, height, static_cast<lcdcolor_t>(color));
170 ev3_lcd_set_font(font);
lcdfont_t m_font
actual font
int32_t m_max_line_on_height
max number of line on screen
static const bool_t black
Black color of write to LCD.
static const bool_t white
White color of write to LCD.
detail::format_impl< Display, detail::string_literal_range > format(char const *pattern)
Write formated text to LCD.
void clearTextLine(uint8_t line, bool_t color=white, int32_t x_offset=0, int32_t line_length=0)
Clear a line.
int32_t m_font_width
width of actual font
void write_raw(char ch, bool clear=false)
Write one character on screen of class Display.
Class Display. API for working with text on display.
void setTextLine(uint8_t line, int32_t x_offset=0, bool clear=true)
Set actual text line index of cursor for next write.
int32_t m_font_height
height of actual font
int32_t getTextLine() const
Get actual text line index.
int32_t m_max_char_on_line
max number of character on one line
virtual void write(char ch)
Write one character on screen of class Display.
int32_t m_x
actual horizontal coordinate from upper left corner
void setFont(lcdfont_t font)
Set font type.
int32_t getFontWidth() const
Get actual font width.
int32_t m_y
actual vertical coordinate from upper left corner
static const uint8_t height
Height of LCD in pixels.
int32_t getFontHeight() const
Get actual font height.
int32_t getX() const
Get actual X coordinates.
~Display()
Destructor of class Display.
static const uint8_t width
Width of LCD in pixels.
detail::format_impl< Display, detail::string_literal_range > format(int8_t line, char const *pattern)
Write formated text to LCD.
void resetScreen(bool_t color=white)
Clear whole LCD.
Display(lcdfont_t font=EV3_FONT_MEDIUM)
Constructor of class Display.
lcdfont_t getFont() const
Get actual font type.
int32_t getY() const
Get actual Y coordinates.