RE: [PHP-GTK-DOC] RE: create xpm: transparent color

From: Date: Mon, 02 Aug 2004 08:09:39 +0000
Subject: RE: [PHP-GTK-DOC] RE: create xpm: transparent color
References: 1  Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-1045@lists.php.net to get a copy of this message
Ahaaaaaaa! > -----Original Message----- > From: Andrei Zmievski [mailto:andrei@gravitonic.com] > Sent: 02 August 2004 05:10 > To: steph@zend.com; cweiske@cweiske.de > Cc: PHP-GTK Doc list > Subject: [PHP-GTK-DOC] RE: create xpm: transparent color > > > Guys, > > > No, that doesn't work. (No idea whether that's a GTK or PHP-GTK thing.) > > Just use 'none' in the pixmap array. > > > > "32 32 7 1", > > " c none", > > ". c #005F00", "+ c #008A00", "@ c #00BB00", > > "# c #00E000", "$ c #00F709", "% c #4BE24A", > > > > BTW is it possible to bring the size of the pixmap array in > > shape_combine_mask to anywhere it might fit onto a laptop screen? > > You are misunderstanding what the "transparent color" parameter is > supposed to mean. You think it will specify the color that is supposed > to be transparent in the pixmap, but that's not true. The transparency > in the pixmap is specified by 'none'. What this parameter actually means > is what color the transparent ('none') pixels will be if you load it and > do not use the mask. For example, use 'none' like Steph suggests and > replace the relevant portion of your code with this: > > $clTransparentTest = &new GdkColor('#0000ff'); > $arPxTest = Gdk::pixmap_create_from_xpm_d($window->window, > $clTransparentTest, $arXPMs['ok']); > > > $btnTest = &new GtkButton(); > $pxmTest = &new GtkPixmap( $arPxTest[0], null); > > You will see that the areas that are supposed to be transparent in the > source xpm are actually colored with blue color now. > > HTH, > > -Andrei > * We reason deeply, when we forcibly feel. * > > -- > PHP-GTK Documentation Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.gtk.doc (#1045) next »