Re: can anybody help with bebugging a little displaying program?


the second argument is the drawable, ie pixmap. the third is the GC
which can be the window style your gonna put the pixmap in.

So you might use:

gdk_pixbuf_render_to_drawable(pixbuf, pixmap,

alternatively you can create a default gc style for the pixmap and use
that for the second argument.


ps- yep i got them really confused. :(

On Tue, 2002-03-19 at 12:51, guo li wrote:

Hi, there,

do u mean I should use:

GtkPixmap *pixmap;

gdk_pixbuf_render_to_drawable (pixbuf, ???,???, 0, 0,0,0,

but how can I fill in the 2nd and 3rd arguments for
gdk_pixbuf_render_to_drawable ?

sorry, I am really new in GTK, thank you so much!


>From: Simon Hookway
>To: guo li
>Subject: Re: can anybody help with bebugging a little displaying
>Date: 19 Mar 2002 12:13:22 +1100
>what you have:
>GtkWidget *window;
>GdkPixbuf *pixbuf;
>GtkWidget *widget;
>window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
>widget = gtk_event_box_new();
>gdk_pixbuf_render_to_drawable (pixbuf,
> widget->window,widget->style->white_gc, 0, 0,0,0,
> gdk_pixbuf_get_width(pixbuf),
>widget->window is NOT a drawable, thus your mistake. Instead render it
>to a pixmap and pack the pixmap into the eventbox and then pack the
>eventbox into the window.

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]