v.0.0.6 source cleanup in drawText
This commit is contained in:
@@ -77,8 +77,7 @@ void LedMatrix::drawText(int x, int y, const char *text, CRGB color)
|
||||
int cursorX = x;
|
||||
for (int i = 0; text[i] != '\0'; i++)
|
||||
{
|
||||
drawChar(cursorX, y, text[i], color);
|
||||
uint8_t chr_width = drawChar(cursorX, 8 + y, text[i], color);
|
||||
uint8_t chr_width = drawChar(cursorX, y, text[i], color);
|
||||
// cursorX += 6; // 5 pixels width + 1 pixel spacing
|
||||
cursorX += (chr_width + 1); // 5 pixels width + 1 pixel spacing
|
||||
}
|
||||
|
||||
11
src/main.cpp
11
src/main.cpp
@@ -67,12 +67,11 @@ void setup()
|
||||
matrix.show();
|
||||
|
||||
// Draw static "HELLO WORLD"
|
||||
// matrix.drawText(1, 1, "Hello", CRGB::Red);
|
||||
// matrix.drawText(35, 1, "World", CRGB::Blue);
|
||||
// matrix.drawText(1, 20, "<°|`¶>", CRGB::Yellow);
|
||||
// matrix.drawText(1, 30, "Bottom", CRGB::Yellow);
|
||||
// matrix.drawText(1, 40, "ABCDEFGHIJ.", CRGB::Yellow);
|
||||
matrix.drawText(1, 40, "Moin u stupid", CRGB::Yellow);
|
||||
matrix.drawText(1, 1, "Hello World!", CRGB::Red);
|
||||
matrix.drawText(1, 9, "<°|`¶>", CRGB::Yellow);
|
||||
matrix.drawText(1, 17, "Bottom", CRGB::Yellow);
|
||||
matrix.drawText(1, 25, "ABCDEFGHIJ.", CRGB::Yellow);
|
||||
matrix.drawText(1, 33, "Moin u stupid", CRGB::Yellow);
|
||||
matrix.show();
|
||||
|
||||
// printCharMatrixSimple('S');
|
||||
|
||||
Reference in New Issue
Block a user