gimp r28079 - in trunk: . plug-ins/common
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28079 - in trunk: . plug-ins/common
- Date: Sat, 28 Feb 2009 17:32:21 +0000 (UTC)
Author: neo
Date: Sat Feb 28 17:32:20 2009
New Revision: 28079
URL: http://svn.gnome.org/viewvc/gimp?rev=28079&view=rev
Log:
2009-02-28 Sven Neumann <sven gimp org>
Bug 573488 â Small bug in Filter>Distorts>Ripple
* plug-ins/common/ripple.c (ripple_vertical): fixed bug spotted
in
SMEAR mode, pointed out by Andreas Groth.
Modified:
trunk/ChangeLog
trunk/plug-ins/common/file-svg.c
trunk/plug-ins/common/ripple.c
Modified: trunk/plug-ins/common/file-svg.c
==============================================================================
--- trunk/plug-ins/common/file-svg.c (original)
+++ trunk/plug-ins/common/file-svg.c Sat Feb 28 17:32:20 2009
@@ -308,6 +308,8 @@
values[1].data.d_string = error->message;
}
+ g_printerr ("%s status: %d\n", G_STRFUNC, status);
+
values[0].data.d_status = status;
}
Modified: trunk/plug-ins/common/ripple.c
==============================================================================
--- trunk/plug-ins/common/ripple.c (original)
+++ trunk/plug-ins/common/ripple.c Sat Feb 28 17:32:20 2009
@@ -260,7 +260,7 @@
gint bpp,
gpointer data)
{
- RippleParam_t *param = (RippleParam_t*) data;
+ RippleParam_t *param = data;
GimpPixelFetcher *pft;
guchar pixel[2][4];
gdouble needy;
@@ -270,26 +270,30 @@
height = param->height;
needy = y + displace_amount(x);
- yi = floor(needy);
- yi_a = yi+1;
+ yi = floor (needy);
+ yi_a = yi + 1;
/* Tile the image. */
if (rvals.edges == WRAP)
{
needy = fmod(needy, height);
+
if (needy < 0.0)
needy += height;
- yi = (yi % height);
+
+ yi = yi % height;
+
if (yi < 0)
yi += height;
- yi_a = (yi+1) % height;
+
+ yi_a = yi_a % height;
}
/* Smear out the edges of the image by repeating pixels. */
else if (rvals.edges == SMEAR)
{
- needy= CLAMP (needy , 0, height - 1);
- yi = CLAMP (yi , 0, height - 1);
- yi_a = CLAMP (yi_a + 1, 0, height - 1);
+ needy = CLAMP (needy, 0, height - 1);
+ yi = CLAMP (yi , 0, height - 1);
+ yi_a = CLAMP (yi_a , 0, height - 1);
}
if (rvals.antialias)
@@ -301,16 +305,16 @@
if (yi_a >=0 && yi_a < height)
gimp_pixel_fetcher_get_pixel (pft, x, yi_a, pixel[1]);
else
- memset(pixel[1], 0, 4);
+ memset (pixel[1], 0, 4);
average_two_pixels (dest, pixel, needy - yi, bpp, param->has_alpha);
} /* antialias */
else
{
- if (yi >=0 && yi < height)
+ if (yi >= 0 && yi < height)
gimp_pixel_fetcher_get_pixel (pft, x, yi, dest);
else
- memset(dest, 0, bpp);
+ memset (dest, 0, bpp);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]