more dummies
just to sketch out the final implementation
This commit is contained in:
@@ -823,8 +823,12 @@ typedef struct Segment {
|
||||
inline void drawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, CRGB c, bool soft = false, uint8_t depth = UINT8_MAX) { drawLine(x0, y0, x1, y1, uint32_t(c) & 0x00FFFFFF, soft, depth); } // automatic inline
|
||||
void drawArc(unsigned x0, unsigned y0, int radius, uint32_t color, uint32_t fillColor = 0);
|
||||
inline void drawArc(unsigned x0, unsigned y0, int radius, CRGB color, CRGB fillColor = BLACK) { drawArc(x0, y0, radius, uint32_t(color) & 0x00FFFFFF, uint32_t(fillColor) & 0x00FFFFFF); } // automatic inline
|
||||
|
||||
void drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t col2 = 0, bool drawShadow = false);
|
||||
inline void drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB c, CRGB c2) { drawCharacter(chr, x, y, w, h, uint32_t(c) & 0x00FFFFFF, uint32_t(c2) & 0x00FFFFFF); } // automatic inline
|
||||
// unicode-aware wrapper for drawCharacter(), to be called from mode_2Dscrollingtext()
|
||||
void drawText(const unsigned char* Text, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t col2 = 0, bool drawShadow = false);
|
||||
|
||||
void wu_pixel(uint32_t x, uint32_t y, CRGB c);
|
||||
//void blur1d(fract8 blur_amount); // blur all rows in 1 dimension
|
||||
void blur2d(fract8 blur_amount) { blur(blur_amount); }
|
||||
|
||||
@@ -5,13 +5,20 @@
|
||||
|
||||
// translates the next unicode UTF-8 item to 2-byte "code points" (reduced UTF-16)
|
||||
uint16_t unicodeToWchar16(const char* utf8, size_t maxLen) {
|
||||
// to be implemented
|
||||
// TODO: implement proper UTF‑8 → reduced UTF‑16 decoding
|
||||
(void)utf8;
|
||||
(void)maxLen;
|
||||
return 0; // sentinel: "no character"
|
||||
}
|
||||
|
||||
// returns a pointer to the next unicode item - can be used to "advance" conversion after unicodeToWchar16()
|
||||
// return nullptr at end of input
|
||||
const char* nextUnicode(const char* utf8, size_t maxLen) {
|
||||
// to be implemented
|
||||
(void)maxLen;
|
||||
if (!utf8) return nullptr;
|
||||
if (strlen(utf8)>0) return utf8+1;
|
||||
else return nullptr; // last code read
|
||||
// TODO: implement proper UTF‑8 iteration
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user