summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/pixops
diff options
context:
space:
mode:
author05:27:43 2000 Owen Taylor <otaylor@redhat.com>2000-04-24 05:28:02 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-04-24 05:28:02 +0000
commita77a3d135d8f22db793db5dfa40a7762ae1e39c9 (patch)
tree861c0690763e77110211de820ac9def5fe4ad90b /gdk-pixbuf/pixops
parent16814166ba3459ddd994b49d41a015d8d62e256d (diff)
downloadgtk+-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/pixops')
-rw-r--r--gdk-pixbuf/pixops/pixops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
index 040f1df6d0..d9592659d0 100644
--- a/gdk-pixbuf/pixops/pixops.c
+++ b/gdk-pixbuf/pixops/pixops.c
@@ -93,7 +93,7 @@ pixops_scale_nearest (guchar *dest_buf,
for (i = 0; i < (render_y1 - render_y0); i++)
{
- const guchar *src = src_buf + ((i * y_step + y_step / 2) >> SCALE_SHIFT) * src_rowstride;
+ const guchar *src = src_buf + (((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT) * src_rowstride;
guchar *dest = dest_buf + i * dest_rowstride;
x = render_x0 * x_step + x_step / 2;