|
Hi All,
I am trying to set drag icon to while dragging. This has to be combination of 2 pixbufs. How can I do this??
Currently I am trying it with 2 approach
1)With the help of gdk_pixbuf_composite();
but I am not able to do it properly.
gdk_pixbuf_composite( pixbuf1, //src
pixbuf2, //dst
0, 0,
156,
116,
0, 0,
1, 1,
GDK_INTERP_BILINEAR,
255);
//Set PixBuf As Drag Icon
gtk_drag_set_icon_pixbuf (context,
pixbuf2,
0, 0);
2)I am creating a pixmap then rendering both pixbufs in pixmap
using gdk_draw_pixbuf().
gdk_draw_pixbuf(g_pixmap,
NULL,
pixbuf1,
0, 0,
0, 0,
-1, -1,
GDK_RGB_DITHER_NORMAL, 0, 0 );
gdk_draw_pixbuf(g_pixmap,
NULL,
pixbuf2,
0, 0,
0, 0,
-1, -1,
GDK_RGB_DITHER_NORMAL, 0, 0 );
And setting that pixmap as a drag Icon using
gtk_drag_set_icon_pixmap(context,
NULL, //colormap g_pixmap,
0, //Mask
0, 0);
But in this case I dont have any colormap. Actually I dont know how to get colormap.
GLIB CRITICAL ** Gtk - gtk_drag_set_icon_pixmap: assertion `GDK_IS_COLORMAP (colormap)' failed
I need ur help..
Sumit
|