using gdkpixbuf instead of gdkpixmap in the scribble program
- From: "anurag sogal" <anuragsogal gmail com>
- To: gtk-list gnome org
- Subject: using gdkpixbuf instead of gdkpixmap in the scribble program
- Date: Sun, 11 Nov 2007 06:15:21 -0500
Hello
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
(GDK_COLORSPACE_RGB,TRUE,5,widget->allocation.width,
widget->allocation.height);
The function to render the pixbuf on the widget is as follows :-
gdk_draw_pixbuf(widget->window,widget->style->white_gc,pixbuf,200,200,200,200,widget->allocation.width,widget->allocation.height,GDK_RGB_DITHER_NORMAL,200,200);
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
properly.
Thanks
Anurag
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]