From 6c860943a520d30f6b9e0b23b203b4822c1f235d Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sat, 19 Jul 2025 09:02:49 +0300 Subject: [PATCH] mctext lib fix --- STM32_HAL_Lib/mctext.c | 2 +- STM32_HAL_Lib/mctext.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/STM32_HAL_Lib/mctext.c b/STM32_HAL_Lib/mctext.c index 8dd4145..34c8da0 100644 --- a/STM32_HAL_Lib/mctext.c +++ b/STM32_HAL_Lib/mctext.c @@ -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 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 diff --git a/STM32_HAL_Lib/mctext.h b/STM32_HAL_Lib/mctext.h index 2dadbe9..52a3d5d 100644 --- a/STM32_HAL_Lib/mctext.h +++ b/STM32_HAL_Lib/mctext.h @@ -11,13 +11,18 @@ #include "stm32g0xx_hal.h" - // 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); // 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); +// 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 void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font);