[GTK+ on Mac OS X] Questions about gdk_drawable_get_image



Hi,

I dont understand the code of this function : gdk_drawable_get_image

the back trace of gdb shows that :

#0 gdk_drawable_real_get_composite_drawable (drawable=0x482e558, x=0, y=0, width=359, height=322, composite_x_offset=0xbfffe428, composite_y_offset=0xbfffe42c) at gdkdraw.c:1189

#1 0x0050ae20 in gdk_drawable_copy_to_image (drawable=0x6269108, image=0x0, src_x=0, src_y=0, dest_x=0, dest_y=0, width=359, height=322) at gdkdraw.c:1057

#2 0x0050b008 in gdk_drawable_get_image (drawable=0x6269108, x=0, y=0, width=359, height=322) at gdkdraw.c:1150


when I check "gdk_drawable_real_get_composite_drawable", I see that only drawable is returned whereas I need to return a part of drawable. Am I wrong ? if not, How can I return the drawable according to x, y, width, height values ?


static GdkDrawable*
gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable,
                                         gint         x,
                                         gint         y,
                                         gint         width,
                                         gint         height,
                                         gint        *composite_x_offset,
                                         gint        *composite_y_offset)
{
 g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);

 *composite_x_offset = 0;
 *composite_y_offset = 0;

 return g_object_ref (drawable);
}


Best regards,

Malik





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