GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Nov 29, 2014 1:14 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Composing 2 Pixbufs
PostPosted: Tue Feb 05, 2008 7:02 am 
Offline
Familiar Face

Joined: Tue Nov 20, 2007 1:55 pm
Posts: 8
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group