Commit d3b444a4 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Fix for #119555, Peter Zelesny:

Tue Nov 18 00:12:55 2003  Matthias Clasen  <maclas@gmx.de>

	Fix for #119555, Peter Zelesny:

	* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
	* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
	by removing the _ prefix.
	* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
	gdk/gdkwindow.c: Adjust all callers.
parent eda4f113
Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de>
Fix for #119555, Peter Zelesny:
* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
by removing the _ prefix.
* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
gdk/gdkwindow.c: Adjust all callers.
Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de> Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_activate): Only activate if * gtk/gtkaction.c (gtk_action_activate): Only activate if
......
Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de>
Fix for #119555, Peter Zelesny:
* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
by removing the _ prefix.
* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
gdk/gdkwindow.c: Adjust all callers.
Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de> Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_activate): Only activate if * gtk/gtkaction.c (gtk_action_activate): Only activate if
......
Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de>
Fix for #119555, Peter Zelesny:
* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
by removing the _ prefix.
* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
gdk/gdkwindow.c: Adjust all callers.
Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de> Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_activate): Only activate if * gtk/gtkaction.c (gtk_action_activate): Only activate if
......
Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de>
Fix for #119555, Peter Zelesny:
* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
by removing the _ prefix.
* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
gdk/gdkwindow.c: Adjust all callers.
Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de> Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_activate): Only activate if * gtk/gtkaction.c (gtk_action_activate): Only activate if
......
Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de>
Fix for #119555, Peter Zelesny:
* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
by removing the _ prefix.
* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
gdk/gdkwindow.c: Adjust all callers.
Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de> Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_activate): Only activate if * gtk/gtkaction.c (gtk_action_activate): Only activate if
......
Tue Nov 18 00:12:23 2003 Matthias Clasen <maclas@gmx.de>
* gdk/gdk-sections.txt: Add gdk_drawable_copy_to_image.
Mon Nov 17 23:29:21 2003 Matthias Clasen <maclas@gmx.de> Mon Nov 17 23:29:21 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_combo_box_new_with_model, * gtk/gtk-sections.txt: Add gtk_combo_box_new_with_model,
......
...@@ -466,6 +466,7 @@ gdk_draw_pixmap ...@@ -466,6 +466,7 @@ gdk_draw_pixmap
gdk_draw_drawable gdk_draw_drawable
gdk_draw_image gdk_draw_image
gdk_drawable_get_image gdk_drawable_get_image
gdk_drawable_copy_to_image
<SUBSECTION Standard> <SUBSECTION Standard>
GDK_DRAWABLE GDK_DRAWABLE
......
...@@ -897,7 +897,7 @@ gdk_draw_glyphs (GdkDrawable *drawable, ...@@ -897,7 +897,7 @@ gdk_draw_glyphs (GdkDrawable *drawable,
/** /**
* _gdk_drawable_copy_to_image: * gdk_drawable_copy_to_image:
* @drawable: a #GdkDrawable * @drawable: a #GdkDrawable
* @image: a #GdkDrawable, or %NULL if a new @image should be created. * @image: a #GdkDrawable, or %NULL if a new @image should be created.
* @src_x: x coordinate on @drawable * @src_x: x coordinate on @drawable
...@@ -912,17 +912,19 @@ gdk_draw_glyphs (GdkDrawable *drawable, ...@@ -912,17 +912,19 @@ gdk_draw_glyphs (GdkDrawable *drawable,
* and copies into that. See gdk_drawable_get_image() for further details. * and copies into that. See gdk_drawable_get_image() for further details.
* *
* Return value: @image, or a new a #GdkImage containing the contents * Return value: @image, or a new a #GdkImage containing the contents
of @drawable * of @drawable
*
* Since: 2.4
**/ **/
GdkImage* GdkImage*
_gdk_drawable_copy_to_image (GdkDrawable *drawable, gdk_drawable_copy_to_image (GdkDrawable *drawable,
GdkImage *image, GdkImage *image,
gint src_x, gint src_x,
gint src_y, gint src_y,
gint dest_x, gint dest_x,
gint dest_y, gint dest_y,
gint width, gint width,
gint height) gint height)
{ {
GdkDrawable *composite; GdkDrawable *composite;
gint composite_x_offset = 0; gint composite_x_offset = 0;
...@@ -1065,7 +1067,7 @@ gdk_drawable_real_get_image (GdkDrawable *drawable, ...@@ -1065,7 +1067,7 @@ gdk_drawable_real_get_image (GdkDrawable *drawable,
gint width, gint width,
gint height) gint height)
{ {
return _gdk_drawable_copy_to_image (drawable, NULL, x, y, 0, 0, width, height); return gdk_drawable_copy_to_image (drawable, NULL, x, y, 0, 0, width, height);
} }
static GdkDrawable* static GdkDrawable*
...@@ -1457,10 +1459,10 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable, ...@@ -1457,10 +1459,10 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
width1, height1, width1, height1,
gdk_drawable_get_depth (drawable), &xs0, &ys0); gdk_drawable_get_depth (drawable), &xs0, &ys0);
_gdk_drawable_copy_to_image (drawable, image, gdk_drawable_copy_to_image (drawable, image,
dest_x + x0, dest_y + y0, dest_x + x0, dest_y + y0,
xs0, ys0, xs0, ys0,
width1, height1); width1, height1);
(*composite_func) (pixbuf->pixels + (src_y + y0) * pixbuf->rowstride + (src_x + x0) * 4, (*composite_func) (pixbuf->pixels + (src_y + y0) * pixbuf->rowstride + (src_x + x0) * 4,
pixbuf->rowstride, pixbuf->rowstride,
(guchar*)image->mem + ys0 * image->bpl + xs0 * image->bpp, (guchar*)image->mem + ys0 * image->bpl + xs0 * image->bpp,
......
...@@ -343,11 +343,19 @@ void gdk_draw_layout_with_colors (GdkDrawable *drawable, ...@@ -343,11 +343,19 @@ void gdk_draw_layout_with_colors (GdkDrawable *drawable,
#define gdk_draw_bitmap gdk_draw_drawable #define gdk_draw_bitmap gdk_draw_drawable
#endif /* GDK_DISABLE_DEPRECATED */ #endif /* GDK_DISABLE_DEPRECATED */
GdkImage* gdk_drawable_get_image (GdkDrawable *drawable, GdkImage* gdk_drawable_get_image (GdkDrawable *drawable,
gint x, gint x,
gint y, gint y,
gint width, gint width,
gint height); gint height);
GdkImage *gdk_drawable_copy_to_image (GdkDrawable *drawable,
GdkImage *image,
gint src_x,
gint src_y,
gint dest_x,
gint dest_y,
gint width,
gint height);
GdkRegion *gdk_drawable_get_clip_region (GdkDrawable *drawable); GdkRegion *gdk_drawable_get_clip_region (GdkDrawable *drawable);
GdkRegion *gdk_drawable_get_visible_region (GdkDrawable *drawable); GdkRegion *gdk_drawable_get_visible_region (GdkDrawable *drawable);
......
...@@ -1298,8 +1298,8 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, ...@@ -1298,8 +1298,8 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
image = _gdk_image_get_scratch (gdk_drawable_get_screen (src), image = _gdk_image_get_scratch (gdk_drawable_get_screen (src),
width1, height1, depth, &xs0, &ys0); width1, height1, depth, &xs0, &ys0);
_gdk_drawable_copy_to_image (src, image, gdk_drawable_copy_to_image (src, image,
src_x + x0, src_y + y0, src_x + x0, src_y + y0,
xs0, ys0, width1, height1); xs0, ys0, width1, height1);
gdk_pixbuf_get_from_image (dest, image, cmap, gdk_pixbuf_get_from_image (dest, image, cmap,
......
...@@ -470,10 +470,10 @@ gdk_pixmap_copy_to_image (GdkDrawable *drawable, ...@@ -470,10 +470,10 @@ gdk_pixmap_copy_to_image (GdkDrawable *drawable,
{ {
g_return_val_if_fail (GDK_IS_PIXMAP (drawable), NULL); g_return_val_if_fail (GDK_IS_PIXMAP (drawable), NULL);
return _gdk_drawable_copy_to_image (((GdkPixmapObject*)drawable)->impl, return gdk_drawable_copy_to_image (((GdkPixmapObject*)drawable)->impl,
image, image,
src_x, src_y, dest_x, dest_y, src_x, src_y, dest_x, dest_y,
width, height); width, height);
} }
static GdkBitmap * static GdkBitmap *
......
...@@ -1941,12 +1941,12 @@ gdk_window_copy_to_image (GdkDrawable *drawable, ...@@ -1941,12 +1941,12 @@ gdk_window_copy_to_image (GdkDrawable *drawable,
_gdk_windowing_window_get_offsets (drawable, &x_offset, &y_offset); _gdk_windowing_window_get_offsets (drawable, &x_offset, &y_offset);
return _gdk_drawable_copy_to_image (((GdkWindowObject*)drawable)->impl, return gdk_drawable_copy_to_image (((GdkWindowObject*)drawable)->impl,
image, image,
src_x - x_offset, src_x - x_offset,
src_y - y_offset, src_y - y_offset,
dest_x, dest_y, dest_x, dest_y,
width, height); width, height);
} }
/* Code for dirty-region queueing /* Code for dirty-region queueing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment