PKGBUILDs/extra/gimp-refocus/refocus-mirror-fix.patch
2009-10-09 21:23:22 -05:00

54 lines
1.8 KiB
Diff

Index: src/tilebuf.c
===================================================================
RCS file: /cvsroot/refocus/refocus/src/tilebuf.c,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 tilebuf.c
--- src/tilebuf.c 30 Jan 2003 21:30:19 -0000 1.1.1.1
+++ src/tilebuf.c 6 Apr 2004 20:26:56 -0000
@@ -140,7 +140,10 @@
for (x = x_lo - 1; x >= buf->real_x; x--)
{
- copy_col (buf, 2 * x_lo - x, y_start, y_end - y_start, x);
+ gint sx = 2 * x_lo - x;
+ copy_col (buf,
+ sx<=buf->real_x+buf->real_width-1?sx:buf->real_x+buf->real_width-1,
+ y_start, y_end - y_start, x);
};
}
break;
@@ -171,7 +174,9 @@
for (x = x_hi; x < buf->real_x + buf->real_width; x++)
{
- copy_col (buf, 2 * (x_hi - 1) - x, y_start, y_end - y_start, x);
+ gint sx = 2 * (x_hi - 1) - x;
+ copy_col (buf, sx>=buf->real_x?sx:buf->real_x,
+ y_start, y_end - y_start, x);
};
}
break;
@@ -200,7 +205,10 @@
for (y = y_lo - 1; y >= buf->real_y; y--)
{
- copy_row (buf, buf->real_x, 2 * y_lo - y, buf->real_width, y);
+ gint sy = 2 * y_lo - y;
+ copy_row (buf, buf->real_x,
+ sy<=buf->real_y+buf->real_height-1?sy:buf->real_y+buf->real_height-1,
+ buf->real_width, y);
};
}
break;
@@ -230,8 +238,9 @@
for (y = y_hi; y < buf->real_y + buf->real_height; y++)
{
- copy_row (buf, buf->real_x, 2 * (y_hi - 1) - y, buf->real_width,
- y);
+ gint sy = 2 * (y_hi - 1) - y;
+ copy_row (buf, buf->real_x, sy>=buf->real_y?sy:buf->real_y,
+ buf->real_width, y);
};
}
break;