Re: [gtk-list] Re: gtk_draw_pixmap problem
- From: Dave Swegen <dave recursive prestel co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: gtk_draw_pixmap problem
- Date: Wed, 16 Dec 1998 19:18:49 +0000
On Wed, Dec 16, 1998 at 19:08 +0000, Allan Black wrote:
> > im = gdk_imlib_load_image(IMAGE);
> > w=im->rgb_width;h=im->rgb_height;
> > gdk_imlib_render(im, w, h);
>
> OK. im now "contains" an image.
>
> > gdkpm = gdk_imlib_move_image(im);
>
> The image from im is now "pointed to" by gdkpm. im's image is now
> NULL (you've *moved* it).
>
> > gdkpm2 = gdk_imlib_move_image(im);
>
> gdkpm2 is now NULL.
>
> > gdk_draw_pixmap(gdkpm2,
> ^^^^^^ That's a NULL pointer.
> > window->style->black_gc,
> > gdkpm,
> > 0, 0, 0, 0, w, h);
>
> I don't know what advice to give you on how to fix your code, because it's
> difficult to figure out what you're trying to do :-)
>
> Perhaps one of the assignments should use gdk_imlib_copy_image? However,
> you'll then end up drawing one pixmap onto another, where the destination
> already contained the image you were copying .... ?
This is more or less what I'm trying to achieve: I have a large backing
gdk_pixmap, which I want to draw smaller pixmaps on top of, and then display.
Changing the call to gdk_imlib_copy_image doesn't work, neither does changing
the creation of gdkpm2 to gdk_pixmap_new from gdk_imlib_copy_image.
Cheers
Dave, confused as ever
--
Dave Swegen | Debian 2.0 on Linux i386 2.1.125
<dave@recursive.prestel.co.uk> | PGP key available on request
<dsw@debian.org> | Linux: The Choice of a GNU Generation
----------------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]