v.0.1.1 rm fontHeight_NxM
This commit is contained in:
@@ -59,17 +59,19 @@ void LedMatrix::drawPixel(int x, int y, CRGB color)
|
||||
uint8_t LedMatrix::drawChar(int x, int y, char c, CRGB color)
|
||||
{
|
||||
#ifdef USE_FONT_5x7
|
||||
const u_int8_t font_width = 5;
|
||||
const std::map<uint8_t, std::vector<uint8_t>> &font = font_5x7;
|
||||
#elifdef USE_FONT_8x8
|
||||
const u_int8_t font_width = 8;
|
||||
const std::map<uint8_t, std::vector<uint8_t>> &font = font_8x8;
|
||||
#elifdef USE_FONT_16x16
|
||||
const std::map<uint8_t, std::vector<uint8_t>> &font = font_16x16;
|
||||
const u_int8_t font_width = 16;
|
||||
const std::map<uint8_t, std::vector<uint16_t>> &font = font_16x16;
|
||||
#endif
|
||||
const vector<uint8_t> &fontData_ = getFontChar(c, font);
|
||||
const uint8_t *fontData = fontData_.data();
|
||||
const u_int8_t char_width_pixel = charWidth(fontData);
|
||||
const u_int8_t font_height = getFontHeight();
|
||||
const u_int8_t font_width = 5;
|
||||
|
||||
for (u_int8_t row = 0; row < font_height; row++)
|
||||
{
|
||||
@@ -118,7 +120,7 @@ const uint8_t LedMatrix::getTextWidth(const char *text)
|
||||
#elifdef USE_FONT_8x8
|
||||
const std::map<uint8_t, std::vector<uint8_t>> &font = font_8x8;
|
||||
#elifdef USE_FONT_16x16
|
||||
const std::map<uint8_t, std::vector<uint8_t>> &font = font_16x16;
|
||||
const std::map<uint8_t, std::vector<uint16_t>> &font = font_16x16;
|
||||
#endif
|
||||
const vector<uint8_t> &fontData_ = getFontChar(text[i], font);
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define USE_FONT_5x7
|
||||
// #define USE_FONT_8x8
|
||||
// #define USE_FONT_5x7
|
||||
#define USE_FONT_8x8
|
||||
// #define USE_FONT_16x16
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
Reference in New Issue
Block a user