using gdkpixbuf instead of gdkpixmap in the scribble program


I am trying to modify the scribble program in the tutorial to
incorporate GdkPixbuf rather than GdkPixmap. The function that creates
a GdkPixbuf is as follows:-

 pixbuf = gdk_pixbuf_new

The function to render the pixbuf on the widget is as follows :-


and then I am passing the pixbuf to gdk_draw_rectangle as follows:-

 gdk_draw_rectangle (pixbuf,widget->style->white_gc,TRUE,0,
0,widget->allocation.width, widget->allocation.height);

Basically the thing that I am trying to do is use pixbuf rather than
pixmap as my backing pixbuf. However for some reason the pixbuf does
not show up on the widget and I am not able to draw on it.

Firstly can I use GdkPixbuf rather than GdkPixmap to to the scribble?
Also could somebody point out if I have not defined the functions



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