diff options
author | 05:27:43 2000 Owen Taylor <otaylor@redhat.com> | 2000-04-24 05:28:02 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-04-24 05:28:02 +0000 |
commit | a77a3d135d8f22db793db5dfa40a7762ae1e39c9 (patch) | |
tree | 861c0690763e77110211de820ac9def5fe4ad90b /gdk-pixbuf/gdk-pixbuf-scale.c | |
parent | 16814166ba3459ddd994b49d41a015d8d62e256d (diff) | |
download | gtk+-a77a3d135d8f22db793db5dfa40a7762ae1e39c9.tar.gz |
Properly offset y coordinate accordining to render_y0.
2000-04-22 05:27:43 2000 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf/pixops/pixops.c (pixops_scale_nearest): Properly
offset y coordinate accordining to render_y0.
* gdk-pixbuf/gdk-pixbuf-scale.c: Properly handle nonzero
dest_x, dest_y.
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-scale.c')
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-scale.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-scale.c b/gdk-pixbuf/gdk-pixbuf-scale.c index 8b5a159e48..23c4ffa571 100644 --- a/gdk-pixbuf/gdk-pixbuf-scale.c +++ b/gdk-pixbuf/gdk-pixbuf-scale.c @@ -68,7 +68,8 @@ gdk_pixbuf_scale (const GdkPixbuf *src, offset_y = floor (offset_y + 0.5); pixops_scale (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels, - -offset_x, -offset_y, dest_width - offset_x, dest_height - offset_y, + dest_x - offset_x, dest_y - offset_y, + dest_x + dest_width - offset_x, dest_y + dest_height - offset_y, dest->rowstride, dest->n_channels, dest->has_alpha, src->pixels, src->width, src->height, src->rowstride, src->n_channels, src->has_alpha, @@ -118,7 +119,8 @@ gdk_pixbuf_composite (const GdkPixbuf *src, offset_x = floor (offset_x + 0.5); offset_y = floor (offset_y + 0.5); pixops_composite (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels, - -offset_x, -offset_y, dest_width - offset_x, dest_height - offset_y, + dest_x - offset_x, dest_y - offset_y, + dest_x + dest_width - offset_x, dest_y + dest_height - offset_y, dest->rowstride, dest->n_channels, dest->has_alpha, src->pixels, src->width, src->height, src->rowstride, src->n_channels, src->has_alpha, @@ -180,7 +182,8 @@ gdk_pixbuf_composite_color (const GdkPixbuf *src, offset_y = floor (offset_y + 0.5); pixops_composite_color (dest->pixels + dest_y * dest->rowstride + dest_x * dest->n_channels, - -offset_x, -offset_y, dest_width - offset_x, dest_height - offset_y, + dest_x - offset_x, dest_y - offset_y, + dest_x + dest_width - offset_x, dest_y + dest_height - offset_y, dest->rowstride, dest->n_channels, dest->has_alpha, src->pixels, src->width, src->height, src->rowstride, src->n_channels, src->has_alpha, |