-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transparent screen background #262
Comments
Hi, I think I'm not clearly understand. What is your goal? What do expect to see with a transparent screen? |
I'm using it to draw a menu over a video image, essentially an OSD. I need the screen background to be transparent to see the video behind the menu. |
Hm, I never tried to use LittlevGL this way. memset(color_p, 0x00, sizeof(lv_color_t) * LV_VDB_SIZE); It will always initialize LittlevGL's internal graphics buffer with In your GUI you still have to set you screen's style to transparent (else LittlevGL will draw it) lv_obj_set_style(lv_scr_act(), &lv_style_transp); I never tested it, so I'm also very curious how it will work. :) But there is an other thing: LittlevGL draws/redraws only if something has changed. So the movie will overwrite the OSD in every frame, right? Or do you have two buffer (one for the movie and one for the OSD) which will be blended together? |
I have 2 buffer, one for the osd. I will try out your suggestion and post back the result. Thanks. |
Meanwhile I also tested it and found a mistake in my suggestion: lv_vdb_t * vdb = lv_vdb_get();
memset(vdb->buf, 0x00, sizeof(lv_color_t) * LV_VDB_SIZE); This way it worked for me. |
I have tested it your suggestion and it is working well. |
Your welcome! If it's public can you send some screen shoots about the OSD menu? |
Looks good! Really like an OSD menu! If you want I happily share a screenshot about this project on the www.littlevgl.com |
I have no issue if you want to share it. Thanks for the great library. |
I also thank you! |
Hi @kisvegabor I am trying to make an LVGL GUI using wayland, that overlays on top of a video stream (which will be playing in a separate wayland window), I need to set transparency to my LVGL GUI in a way such that the video would be visible all the time, and only some buttons of my GUI would be displayed on top of the video and all the GUI background would be transparent. I tried your suggestion:
but lv_vdb_t and lv_vdb_get are not defined in my LVGL repo, I am using LVGL V8.3.2 Best Regards! |
Hi,
|
I am trying to draw a simple object onto the Linux framebuffer. The object does not takes up the whole screen. When the object is drawn to the screen, the background is always white. Is there a way to make the background of the screen transparent? The color space used is argb and the "a" is always the same value (0xff) regardless of the transparency set.
The text was updated successfully, but these errors were encountered: