Page 1 of 1

Transparent background for off-screen rendering

PostPosted: Tue Oct 27, 2020 12:06 pm
by shannah
I'm having a hard time figuring out how to get transparent backgrounds in an off-screen renderer. I've been banging my head on this for a couple of days now and can't seem to get either the settings.background_color property to do anything (for any color - let alone transparent colors). And also setting the "transparent" argument of CefBrowser_N.createBrowser() to true. No effect. The alpha values in my onPaint callback are always 0xff.

Has anyone else successfully gotten transparent background working for OSR?

Ultimately I'm trying to obtain a screenshot of an HTML element on the page, but transparency is important.

Re: Transparent background for off-screen rendering

PostPosted: Tue Oct 27, 2020 12:42 pm
by Czarek

Re: Transparent background for off-screen rendering

PostPosted: Wed Oct 28, 2020 7:10 am
by shannah
Thanks for the reply. After looking through the commits in Git, I noticed a relatively recent update in the version of CEF.
https://github.com/chromiumembedded/jav ... 2f5aa681b8

When I rebuilt with that version, it corrected the issue and I was able to get transparency working.

Best regards

Steve