[Swfdec] Transparency of widget backgrounds
Karri Kaksonen
karri.kaksonen at furuno.fi
Fri Aug 28 01:25:33 PDT 2009
Hi,
I played around with gtk transparency a bit.
If I add an expose event to the main window in the player and let the
engine render the view on the top screen I get a transparent flash
player where the desktop is seen through in places where there is no
opaque pixels in the flash movie.
But if I try to use the GTK widget provided by sfwdec then the widget
will render its own background in its own swfdec_gtk_widget_expose routine.
The basic thing I would like to do is to modify the
swfdec_gtk_widget_expose routine to clear its own background before
rendering the flash.
In swfdec_gtk_widget_expose:
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
cairo_paint (cr);
swfdec_player_render (priv->player, cr);
This sequence does what I want if I put it to the expose event of the
window created by "gtk_window_new (GTK_WINDOW_TOPLEVEL)". But it does
not do what I want when I place it to the expose routine of the gtk widget.
I would like to pass the main window expose event to the gtk widget that
would then render the flash. But for some reason I only get a very small
transparent corner in the widget and the rest of the widget has an
opaque background. It is like the sfwdec_gtk_widget would still call
some other widget to render itself. And that destroys widget transparency.
Any ideas?
--
Regards,
Karri Kaksonen
More information about the Swfdec
mailing list