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.
This commit is contained in:
Matthias Clasen 2003-11-17 23:16:49 +00:00 committed by Matthias Clasen
parent eda4f1134f
commit d3b444a4c5
12 changed files with 97 additions and 32 deletions

View File

@ -1,3 +1,13 @@
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>
* gtk/gtkaction.c (gtk_action_activate): Only activate if

View File

@ -1,3 +1,13 @@
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>
* gtk/gtkaction.c (gtk_action_activate): Only activate if

View File

@ -1,3 +1,13 @@
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>
* gtk/gtkaction.c (gtk_action_activate): Only activate if

View File

@ -1,3 +1,13 @@
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>
* gtk/gtkaction.c (gtk_action_activate): Only activate if

View File

@ -1,3 +1,13 @@
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>
* gtk/gtkaction.c (gtk_action_activate): Only activate if

View File

@ -1,3 +1,7 @@
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>
* gtk/gtk-sections.txt: Add gtk_combo_box_new_with_model,

View File

@ -466,6 +466,7 @@ gdk_draw_pixmap
gdk_draw_drawable
gdk_draw_image
gdk_drawable_get_image
gdk_drawable_copy_to_image
<SUBSECTION Standard>
GDK_DRAWABLE

View File

@ -897,7 +897,7 @@ gdk_draw_glyphs (GdkDrawable *drawable,
/**
* _gdk_drawable_copy_to_image:
* gdk_drawable_copy_to_image:
* @drawable: a #GdkDrawable
* @image: a #GdkDrawable, or %NULL if a new @image should be created.
* @src_x: x coordinate on @drawable
@ -912,17 +912,19 @@ gdk_draw_glyphs (GdkDrawable *drawable,
* and copies into that. See gdk_drawable_get_image() for further details.
*
* Return value: @image, or a new a #GdkImage containing the contents
of @drawable
* of @drawable
*
* Since: 2.4
**/
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)
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)
{
GdkDrawable *composite;
gint composite_x_offset = 0;
@ -1065,7 +1067,7 @@ gdk_drawable_real_get_image (GdkDrawable *drawable,
gint width,
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*
@ -1457,10 +1459,10 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
width1, height1,
gdk_drawable_get_depth (drawable), &xs0, &ys0);
_gdk_drawable_copy_to_image (drawable, image,
dest_x + x0, dest_y + y0,
xs0, ys0,
width1, height1);
gdk_drawable_copy_to_image (drawable, image,
dest_x + x0, dest_y + y0,
xs0, ys0,
width1, height1);
(*composite_func) (pixbuf->pixels + (src_y + y0) * pixbuf->rowstride + (src_x + x0) * 4,
pixbuf->rowstride,
(guchar*)image->mem + ys0 * image->bpl + xs0 * image->bpp,

View File

@ -343,11 +343,19 @@ void gdk_draw_layout_with_colors (GdkDrawable *drawable,
#define gdk_draw_bitmap gdk_draw_drawable
#endif /* GDK_DISABLE_DEPRECATED */
GdkImage* gdk_drawable_get_image (GdkDrawable *drawable,
gint x,
gint y,
gint width,
gint height);
GdkImage* gdk_drawable_get_image (GdkDrawable *drawable,
gint x,
gint y,
gint width,
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_visible_region (GdkDrawable *drawable);

View File

@ -1298,8 +1298,8 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
image = _gdk_image_get_scratch (gdk_drawable_get_screen (src),
width1, height1, depth, &xs0, &ys0);
_gdk_drawable_copy_to_image (src, image,
src_x + x0, src_y + y0,
gdk_drawable_copy_to_image (src, image,
src_x + x0, src_y + y0,
xs0, ys0, width1, height1);
gdk_pixbuf_get_from_image (dest, image, cmap,

View File

@ -470,10 +470,10 @@ gdk_pixmap_copy_to_image (GdkDrawable *drawable,
{
g_return_val_if_fail (GDK_IS_PIXMAP (drawable), NULL);
return _gdk_drawable_copy_to_image (((GdkPixmapObject*)drawable)->impl,
image,
src_x, src_y, dest_x, dest_y,
width, height);
return gdk_drawable_copy_to_image (((GdkPixmapObject*)drawable)->impl,
image,
src_x, src_y, dest_x, dest_y,
width, height);
}
static GdkBitmap *

View File

@ -1941,12 +1941,12 @@ gdk_window_copy_to_image (GdkDrawable *drawable,
_gdk_windowing_window_get_offsets (drawable, &x_offset, &y_offset);
return _gdk_drawable_copy_to_image (((GdkWindowObject*)drawable)->impl,
image,
src_x - x_offset,
src_y - y_offset,
dest_x, dest_y,
width, height);
return gdk_drawable_copy_to_image (((GdkWindowObject*)drawable)->impl,
image,
src_x - x_offset,
src_y - y_offset,
dest_x, dest_y,
width, height);
}
/* Code for dirty-region queueing