Transparent image
- From: Rok Jaklič <rokj rasca net>
- To: gtkmm-list gnome org
- Subject: Transparent image
- Date: Fri, 31 Aug 2007 09:22:18 +0200
Hi.
I am sending this mail again since there was problems with mailing list
yesterday ...
I have a simple program which loads image from file and display it into
the window. Image has also some transparent sections. Is it possible to
show image without window background (soo I can see desktop background).
Code:
#include <gtkmm.h>
int main(int argc, char *argv[]) {
Gtk::Main kit(argc, argv);
Gtk::Window window;
// window.fullscreen();
Glib::RefPtr<Gdk::Pixbuf> pixbuf =
Gdk::Pixbuf::create_from_file("images/logo.png");
Gtk::Widget *image = new Gtk::Image(pixbuf);
window.add(*image);
window.set_decorated(false);
window.show_all();
Gtk::Main::run(window);
Gtk::Main::quit();
return 0;
}
Kind regards,
Rok
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]