Flash transparency

329 views
Skip to first unread message

weezelboy

unread,
May 3, 2012, 2:22:31 PM5/3/12
to cefs...@googlegroups.com
I'd like to switch from Awesomium to an open source alternative and Cef# looks great but I need flash to support transparency. Is this a nightmare to implement?

anthony taranto

unread,
May 3, 2012, 2:26:30 PM5/3/12
to cefs...@googlegroups.com
I believe a few people are using CefSharp in this way, maybe they can comment on steps involved.

weezelboy

unread,
May 3, 2012, 2:29:00 PM5/3/12
to cefs...@googlegroups.com
I forgot to mention I'm using WPF

anthony...@gmail.com

unread,
May 3, 2012, 2:43:03 PM5/3/12
to cefs...@googlegroups.com
It should be even easier in WPF. The Wpf WebView control should act like any other WPF control.
> --
>
> You received this message because you are subscribed to the Google Groups "CefSharp" group.
>
> To view this discussion on the web visit https://groups.google.com/d/msg/cefsharp/-/8eWOuZVQKygJ.
>
> To post to this group, send email to cefs...@googlegroups.com.
>
> To unsubscribe from this group, send email to cefsharp+u...@googlegroups.com.
>
>
> For more options, visit this group at http://groups.google.com/group/cefsharp?hl=en.
>
>
>
>

weezelboy

unread,
May 3, 2012, 7:06:23 PM5/3/12
to cefs...@googlegroups.com
To be clear I'm not talking about the transparency of the WPF control, but the transparency of the HTML/SWF. For example if I rendered a blank web page with 'background:'transparent'' would the WPF control display as white or transparent? This allows me to overlay non rectangular and semi-transparent SWF's on top of other WPF controls.

anthony taranto

unread,
May 3, 2012, 7:23:46 PM5/3/12
to cefs...@googlegroups.com
Not sure, you'll have to try it out and let us know.

The WPF control itself won't adjust its transparency based on the web
content, you'll most likely have to set the WPF Opacity property. The
WPF control is essentially just a System.Windows.Controls.Image.
> --
> You received this message because you are subscribed to the Google Groups
> "CefSharp" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cefsharp/-/NkiDE-tsV7YJ.

weezelboy

unread,
May 31, 2012, 2:42:03 PM5/31/12
to cefs...@googlegroups.com
I noticed the paint handlers are using the format PixelFormats::Bgr32. Is there any reason this cant be PixelFormats::Bgra32 to preserve the transparency?

anthony taranto

unread,
May 31, 2012, 3:04:42 PM5/31/12
to cefs...@googlegroups.com
Maybe, have you tried it?

weezelboy

unread,
May 31, 2012, 3:28:01 PM5/31/12
to cefs...@googlegroups.com
N, I can't build in VS2010.

Jack O'Connor

unread,
May 31, 2012, 4:27:14 PM5/31/12
to cefs...@googlegroups.com
I've found that Visual C++ Express 2008 works find for building CefSharp (though not the test/example projects), if you want to try it.

On Thu, May 31, 2012 at 12:28 PM, weezelboy <mti...@gmail.com> wrote:
N, I can't build in VS2010.

--
You received this message because you are subscribed to the Google Groups "CefSharp" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cefsharp/-/lF-kYGZrHswJ.

Dana Cartwright

unread,
Aug 29, 2013, 11:40:33 AM8/29/13
to cefs...@googlegroups.com
I know this thread is over a year old, but I did try this out (compiling under VS2010). I found that this does indeed work if you combine the idea of Bgra32 rendering with a call to CefWindowInfo.SetTransparentPainting(TRUE). I have submitted a pull request to CefSharp to implement this, since I think it's general purpose (but I could easily be wrong about that, feel free to set me straight in the pull request).

https://github.com/cefsharp/CefSharp/pull/161

weezelboy

unread,
Jan 22, 2014, 2:17:14 PM1/22/14
to cefs...@googlegroups.com

I've come across an issue with transparency in Flash. It seems portions of the control do not get rendered correctly. I've attached an example where the black should be transparent. Any obvious reason for this?


artifacts.jpg
Reply all
Reply to author
Forward
0 new messages