mikroSDK TFT redraw label

Fully featured ARM compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
kkanjuh.kingict
Posts: 6
Joined: 23 Nov 2021 14:04

mikroSDK TFT redraw label

#1 Post by kkanjuh.kingict » 15 Jan 2022 15:48

Hi,

Could you please suggest me how to simple clear old label text before drawing new text? For now, I draw box that is bigger of label, but this probably spent more time for clearing old text label.
Background of label is gradient. I use 7" TFT capacitive display with Fusion STM32 v8 board.

Regards

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: mikroSDK TFT redraw label

#2 Post by darko.ilijevski » 20 Jan 2022 08:20

Hello,
I am afraid there is not an easy way to clear the text. Drawing a box or a thick line is one way. Another way would be writing the same text but in the color of the background.

If you are using the GL library by itself (and not as a part of a Designer project), you can use the function called gl_set_font_background(true) to set a solid-color background for the font. The background color can be set by the gl_set_font_background_color(gl_color_t) function.
However, if you have a gradient or a picture in the background, the task might not be as trivial.

Maybe some of my colleagues have a better solution than this - it is how I use it when I need to display some sensor values on the screen.

Best regards,
Darko
BR,
Darko

kkanjuh.kingict
Posts: 6
Joined: 23 Nov 2021 14:04

Re: mikroSDK TFT redraw label

#3 Post by kkanjuh.kingict » 20 Jan 2022 17:30

Hi,

Is possible somehow to read part of screen or read pixel value?
Also how I can use _draw_rounded_button from VTFT library (https://docs.mikroe.com/mikrosdk/ref-ma ... 5fe6485c66)


Regards,
Kruno

Post Reply

Return to “ARM AI Compilers”