Re: Gtk Pixmap and png
- From: Brett Granger <bdgranger alum mit edu>
 
- To: Arno <dark-arno ifrance com>
 
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
 
- Subject: Re: Gtk Pixmap and png
 
- Date: Thu, 25 Jul 2002 11:38:20 -0400
 
Arno wrote:
RevX gmx at wrote:
Hi,
 
I have found an other function : gtk_image_new_from_file. And with this 
function, it's good. I don't know why but it's good.
pixmap = gtk_image_new_from_file("../Back-prelight.png");
gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar),
             "Back",
             "bla bla",
             NULL,
             pixmap,
             NULL,
             NULL,
             -1);
You have found the "right" answer for translucency -- GtkImage.  Pixmaps 
don't inherently handle translucency, so the best you can do is a solid 
pixmap with a mask, as you discovered in your experiments.  Images in 
GTK2 handle alpha.  The only issues to watch out for are on "older" 
networked/non-desktop displays where Images might be significantly 
slower than pixmaps.
--Brett
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]