Thursday, April 26th 2018, 7:12pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

fifo

Beginner

Date of registration: Aug 14th 2017

Posts: 13

1

Thursday, August 17th 2017, 3:47pm

Displaying changing text with transparant background

Hi I want to display text with a transparent background. So instead of the text having a rectangular background of what ever color, It should not have a background hence have a transparent background. Now the SetTextMode(GUI_TM_TRANS) makes the text background transparent but when you have changing values the previous value ends up not cleared and you end up with filled in squares.

Now there must be a way to do this I see many users wanting to display text over a bitmap.

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 562

2

Thursday, August 17th 2017, 4:28pm

Hi,

Of course, here you go:

Displaying changing transparant text

Regards,
Sven

fifo

Beginner

Date of registration: Aug 14th 2017

Posts: 13

3

Friday, August 18th 2017, 10:06am

Thanks for the response sven, yes that works, I have put the code in my while loop that displays the changing value. Now I am going to try and use the window manager way. I have not used the windows manager and don't know anything about it, I am assuming it basically acts like the way windows handles controls.

There is one main issue though is that you see the flicker as it redraws the background and then writes the new text over it. Doesn't the GUI library support double buffering or something? How do you get round this flicker issue? If the text is very small then its not so much of a problem but it becomes apparent when displaying larger text.

fifo

Beginner

Date of registration: Aug 14th 2017

Posts: 13

4

Friday, August 18th 2017, 12:09pm

Could you please send me an example of a C bitmap file with all the window functions so I can have a look and create functions for my c bitmap file?
Thanks in Advance.

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 562

5

Friday, August 18th 2017, 3:22pm

Hi,

emWin supports multi buffering. If configured properly in the LCDConf.c a call of WM_MULTIBUF_Enable(1) enables the automatic use of multibuffering by the Window Manager.

Which driver are you using?

If you are using GUIDRV_Lin you can use multibuffering. If you use e.g. GUIDRV_FlexColor multibuffering is not available but you can set it up to a cache which hase more or less the same function than multiple buffers.

You can simply create your own c-bitmaps with the BitmapConverter. If you are using an ST device you can use the BitmapConverter (BmpCvt.exe) which comes with the STM32Cube pakage.

If not, you can download a demo version of the BitmapConvert from our website:
https://www.segger.com/downloads/emwin/

The demo version has the same functionality as the full version but shows a pop up at the beginning.

Regards,
Sven