Re: Creating pixmap from xpm with NULL window and colormap
| From: | Pablo Dall'Oglio | Date: | Tue, 01 Oct 2002 20:57:47 +0000 |
| Subject: | Re: Creating pixmap from xpm with NULL window and colormap | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2492@lists.php.net to get a copy of this message | ||
try:
$window->realize();
before all.
Pablo
On Tue, 01 Oct 2002 22:35:57 +0200
Gabor Hojtsy <gabor@hojtsy.hu> wrote:
> Hi!
>
> I use this code to load in an XPM:
>
> | $white = new GdkColor(255, 255, 255);
> | list($pixmap, $mask) =
> | Gdk::pixmap_create_from_xpm(
> | $window->window,
> | $white,
> | "f:/_gtk/code/feed.xpm"
> | );
>
> What PHP-GTK does with this is to load in the image,
> though without any transparency on the white color, and
> put out a warning to my DOS window, saying:
>
> Gdk-WARNING **: Creating pixmap from xpm with NULL window and colormap
>
> Well, I don't know what's the problem, the documentation page for
> this is absolutely what I follow:
>
>
> http://gtk.php.net/manual/en/gdk.method.pixmap_create_from_xpm.php
>
> $window above is the main GtkWindow, and it should have a
> window property, shouldn't it (inherited from GtkWidget)?
>
> The feed.xpm file is absolutely correct XPM format, it's created
> by imagemagick convert and it's viewable by image viewers. It's also
> loaded in by my script, but the transparency is not in effect, and
> that warning is printed.
>
> Can anybody please give an advice what to do in this case.
>
> Thanks,
> Goba
>
>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
+--------------------------------------------------+
| _ Pablo Dall'Oglio (pablo@php.net) |
| °v° Univates - IT Department +55 51 3714-7040 |
| /(_)\ The best source is the source code |
| ^ ^ Linux User n.223253, Lajeado, RS - Brasil |
+--------------------------------------------------+
: Programmer, pilot, wine taster and a half musician