mctext lib fix

This commit is contained in:
2025-07-19 09:02:49 +03:00
parent 1852c697fc
commit 6c860943a5
2 changed files with 7 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ uint8_t mct_CharTS(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const u
// Draw a single character. Not scaled // Draw a single character. Not scaled
uint8_t mct_CharT(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font, uint8_t transp) { uint8_t mct_CharT(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font, uint8_t transp) {
return mct_CharTS(x, y, c, color, font, 1, 1); return mct_CharTS(x, y, c, color, font, transp, 1);
} }
// Draw a single character. Transparent background. Returns width of drawn character // Draw a single character. Transparent background. Returns width of drawn character

View File

@@ -11,13 +11,18 @@
#include "stm32g0xx_hal.h" #include "stm32g0xx_hal.h"
// Draw a single character. Returns width of drawn character // Draw a single character. Returns width of drawn character
uint8_t mct_CharTS(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font, uint8_t transp, uint8_t scale);
// Draw a single character. Not scaled
uint8_t mct_CharT(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font, uint8_t transp); uint8_t mct_CharT(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font, uint8_t transp);
// Draw a single character. Transparent background. Returns width of drawn character // Draw a single character. Transparent background. Returns width of drawn character
uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font); uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font);
// Draw a string of characters. Transparency, Scale
void mct_StringTS(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font, uint8_t transp, uint8_t scale);
// Draw a string of characters // Draw a string of characters
void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font); void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font);