Commit 93eb30f6 authored by Sven Neumann's avatar Sven Neumann
Browse files

I am stupid. Dropping the 4-byte alignment caused the

buffer's rowstride to become different from the
GtkPreview's one. Fixed it by using preview->rowstride
in all cases.


--Sven
parent f7a95205
2000-05-23 Sven Neumann <sven@gimp.org>
* plug-ins/common/flarefx.c
* plug-ins/common/glasstile.c
* plug-ins/common/grid.c
* plug-ins/common/illusion.c
* plug-ins/common/jigsaw.c
* plug-ins/common/max_rgb.c
* plug-ins/common/noisify.c
* plug-ins/common/nova.c
* plug-ins/common/plasma.c: I am stupid. Dropping the
4-byte alignment caused the buffer's rowstride to
become different from the GtkPreview's one. Fixed it
by using preview->rowstride in all cases.
2000-05-23 Sven Neumann <sven@gimp.org>
 
* plug-ins/common/plasma.c: applied modified version of
......
......@@ -215,7 +215,7 @@ query (void)
"Karl-Johan Andersson", /* Copyright */
"May 2000",
N_("<Image>/Filters/Light Effects/FlareFX..."),
"RGB",
"RGB*",
PROC_PLUG_IN,
nargs, 0,
args, NULL);
......@@ -411,15 +411,20 @@ FlareFX (GDrawable *drawable,
}
matt = width;
/* allocate row buffers */
cur_row = g_new (guchar, (x2 - x1) * bytes);
dest = g_new (guchar, (x2 - x1) * bytes);
if (!preview_mode)
if (preview_mode)
{
cur_row = g_new (guchar, GTK_PREVIEW (preview)->rowstride);
dest = g_new (guchar, GTK_PREVIEW (preview)->rowstride);
}
else
{
/* initialize the pixel regions */
gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, width, height, FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, 0, 0, width, height, TRUE, TRUE);
cur_row = g_new (guchar, (x2 - x1) * bytes);
dest = g_new (guchar, (x2 - x1) * bytes);
}
scolor = (gfloat)matt * 0.0375;
......@@ -440,7 +445,9 @@ FlareFX (GDrawable *drawable,
for (row = y1; row < y2; row++) /* y-coord */
{
if (preview_mode)
memcpy(cur_row,preview_bits+(width*bytes*row),width*bytes);
memcpy (cur_row,
preview_bits + GTK_PREVIEW (preview)->rowstride * row,
GTK_PREVIEW (preview)->rowstride);
else
gimp_pixel_rgn_get_row (&srcPR, cur_row, x1, row, x2-x1);
......@@ -476,8 +483,9 @@ FlareFX (GDrawable *drawable,
}
if (preview_mode)
{
memcpy (GTK_PREVIEW (preview)->buffer + (width * bytes * row),
cur_row, width * bytes);
memcpy (GTK_PREVIEW (preview)->buffer + GTK_PREVIEW (preview)->rowstride * row,
cur_row,
GTK_PREVIEW (preview)->rowstride);
}
else
{
......@@ -880,9 +888,7 @@ preview_widget (GDrawable *drawable)
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
fill_preview_with_thumb (preview, drawable->id);
size = (GTK_PREVIEW (preview)->buffer_width) *
(GTK_PREVIEW (preview)->buffer_height) *
(GTK_PREVIEW (preview)->bpp);
size = GTK_PREVIEW (preview)->rowstride * GTK_PREVIEW (preview)->buffer_height;
preview_bits = g_malloc (size);
memcpy (preview_bits, GTK_PREVIEW (preview)->buffer, size);
......
......@@ -349,9 +349,7 @@ preview_widget (GDrawable *drawable)
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
fill_preview_with_thumb (preview, drawable->id);
size = (GTK_PREVIEW (preview)->buffer_width) *
(GTK_PREVIEW (preview)->buffer_height) *
(GTK_PREVIEW (preview)->bpp);
size = GTK_PREVIEW (preview)->rowstride * GTK_PREVIEW (preview)->buffer_height;
preview_bits = g_malloc (size);
memcpy (preview_bits, GTK_PREVIEW (preview)->buffer, size);
......@@ -532,12 +530,18 @@ glasstile (GDrawable *drawable,
if (preview_mode)
{
if (ypixel2 < height)
memcpy (cur_row, preview_bits + (ypixel2 * width * bytes), width * bytes);
memcpy (cur_row,
preview_bits + (ypixel2 * GTK_PREVIEW (preview)->rowstride),
GTK_PREVIEW (preview)->rowstride);
else
memcpy (cur_row, preview_bits + ((y2 - 1) * width * bytes), width * bytes);
memcpy (cur_row,
preview_bits + ((y2 - 1) * GTK_PREVIEW (preview)->rowstride),
GTK_PREVIEW (preview)->rowstride);
if (cbytes != bytes) /* Alpha check */
memcpy (ad, preview_bits + (row * width * bytes), width * bytes);
memcpy (ad,
preview_bits + (row * GTK_PREVIEW (preview)->rowstride),
GTK_PREVIEW (preview)->rowstride);
}
else
{
......@@ -593,7 +597,9 @@ glasstile (GDrawable *drawable,
/* Store the dest */
if (preview_mode)
memcpy (GTK_PREVIEW (preview)->buffer + (width * bytes * row), dest, width * bytes);
memcpy (GTK_PREVIEW (preview)->buffer + (GTK_PREVIEW (preview)->rowstride * row),
dest,
GTK_PREVIEW (preview)->rowstride);
else
gimp_pixel_rgn_set_row (&destPR, dest, x1, row, iwidth);
......@@ -617,3 +623,7 @@ glasstile (GDrawable *drawable,
g_free (dest);
g_free (ad);
}
......@@ -421,9 +421,11 @@ doit (gint32 image_ID,
for (y = sy1; y < sy2; y++)
{
if (preview_mode)
memcpy(dest, preview_bits + (sx2 * bytes * y), sx2 * bytes);
memcpy (dest,
preview_bits + (GTK_PREVIEW (preview)->rowstride * y),
GTK_PREVIEW (preview)->rowstride);
else
gimp_pixel_rgn_get_row (&srcPR, dest, sx1, y, (sx2-sx1));
gimp_pixel_rgn_get_row (&srcPR, dest, sx1, y, (sx2 - sx1));
y_offset = y - grid_cfg.voffset;
while (y_offset < 0)
......@@ -484,7 +486,9 @@ doit (gint32 image_ID,
}
if (preview_mode)
{
memcpy(GTK_PREVIEW (preview)->buffer+(sx2*bytes*y),dest,sx2*bytes);
memcpy (GTK_PREVIEW (preview)->buffer + GTK_PREVIEW (preview)->rowstride,
dest,
GTK_PREVIEW (preview)->rowstride);
}
else
{
......@@ -983,9 +987,7 @@ preview_widget (GDrawable *drawable)
{
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
fill_preview (preview, drawable);
size = (GTK_PREVIEW (preview)->buffer_width) *
(GTK_PREVIEW (preview)->buffer_height) *
(GTK_PREVIEW (preview)->bpp);
size = GTK_PREVIEW (preview)->rowstride * GTK_PREVIEW (preview)->buffer_height;
preview_bits = g_malloc (size);
memcpy (preview_bits, GTK_PREVIEW (preview)->buffer, size);
}
......
......@@ -327,10 +327,11 @@ filter_preview (void)
for (y = 0; y < image_height; y++)
{
pixels[y] = g_new (guchar, image_width * image_bpp);
destpixels[y] = g_new (guchar, image_width * image_bpp);
memcpy (pixels[y], preview_bits + (image_width * image_bpp * y),
image_width * image_bpp);
pixels[y] = g_new (guchar, GTK_PREVIEW (preview)->rowstride);
destpixels[y] = g_new (guchar, GTK_PREVIEW (preview)->rowstride);
memcpy (pixels[y],
preview_bits + GTK_PREVIEW (preview)->rowstride * y,
GTK_PREVIEW (preview)->rowstride);
}
scale = sqrt (image_width * image_width + image_height * image_height) / 2;
......@@ -373,8 +374,9 @@ filter_preview (void)
(1-radius) * pixels[y][x * image_bpp + b]
+ radius * pixels[yy][xx * image_bpp + b];
}
memcpy (GTK_PREVIEW (preview)->buffer + (image_width * image_bpp * y),
destpixels[y], image_width * image_bpp);
memcpy (GTK_PREVIEW (preview)->buffer + GTK_PREVIEW (preview)->rowstride * y,
destpixels[y],
GTK_PREVIEW (preview)->rowstride);
}
for (y = 0; y < image_height; y++)
......@@ -396,9 +398,7 @@ preview_widget (GDrawable *drawable)
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
fill_preview_with_thumb (preview, drawable->id);
size = (GTK_PREVIEW (preview)->buffer_width) *
(GTK_PREVIEW (preview)->buffer_height) *
(GTK_PREVIEW (preview)->bpp);
size = GTK_PREVIEW (preview)->rowstride * GTK_PREVIEW (preview)->buffer_height;
preview_bits = g_malloc (size);
memcpy (preview_bits, GTK_PREVIEW (preview)->buffer, size);
......
......@@ -88,89 +88,110 @@ static void draw_jigsaw (guchar *buffer,
gint bytes,
gboolean preview_mode);
static void draw_vertical_border (guchar *buffer, gint width, gint height,
gint bytes, gint x_offset, gint ytiles,
gint blend_lines, gdouble blend_amount);
static void draw_horizontal_border(guchar *buffer, gint width,
gint bytes, gint y_offset, gint xtiles,
gint blend_lines, gdouble blend_amount);
static void draw_vertical_line(guchar *buffer, gint width, gint bytes,
gint px[2], gint py[2]);
static void draw_horizontal_line(guchar *buffer, gint width, gint bytes,
gint px[2], gint py[2]);
static void darken_vertical_line(guchar *buffer, gint width, gint bytes,
gint *px, gint *py, gdouble delta);
static void lighten_vertical_line(guchar *buffer, gint width, gint bytes,
gint *px, gint *py, gdouble delta);
static void darken_horizontal_line(guchar *buffer, gint width, gint bytes,
gint *px, gint *py, gdouble delta);
static void draw_vertical_border (guchar *buffer, gint width, gint height,
gint bytes, gint x_offset, gint ytiles,
gint blend_lines, gdouble blend_amount,
gboolean preview_mode);
static void draw_horizontal_border (guchar *buffer, gint width,
gint bytes, gint y_offset, gint xtiles,
gint blend_lines, gdouble blend_amount,
gboolean preview_mode);
static void draw_vertical_line (guchar *buffer, gint width, gint bytes,
gint px[2], gint py[2],
gboolean preview_mode);
static void draw_horizontal_line (guchar *buffer, gint width, gint bytes,
gint px[2], gint py[2],
gboolean preview_mode);
static void darken_vertical_line (guchar *buffer, gint width, gint bytes,
gint *px, gint *py, gdouble delta,
gboolean preview_mode);
static void lighten_vertical_line (guchar *buffer, gint width, gint bytes,
gint *px, gint *py, gdouble delta,
gboolean preview_mode);
static void darken_horizontal_line (guchar *buffer, gint width, gint bytes,
gint *px, gint *py, gdouble delta,
gboolean preview_mode);
static void lighten_horizontal_line(guchar *buffer, gint width, gint bytes,
gint *px, gint *py, gdouble delta);
static void draw_right_bump(guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps);
static void draw_left_bump(guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps);
static void draw_up_bump(guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps);
static void draw_down_bump(guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps);
static void darken_right_bump(guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter);
static void lighten_right_bump(guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter);
static void darken_left_bump(guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter);
static void lighten_left_bump(guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter);
static void darken_up_bump(guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offest,
gint steps, gdouble delta, gint counter);
static void lighten_up_bump(guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter);
static void darken_down_bump(guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter);
static void lighten_down_bump(guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter);
static void generate_grid(gint width, gint height, gint xtiles, gint ytiles,
gint *x, gint *y);
static void generate_bezier(gint px[4], gint py[4], gint steps,
gint *cachex, gint *cachey);
static void malloc_cache(void);
static void free_cache(void);
static void init_right_bump(gint width, gint height);
static void init_left_bump(gint width, gint height);
static void init_up_bump(gint width, gint height);
static void init_down_bump(gint width, gint height);
static void draw_bezier_line(guchar *buffer, gint width, gint bytes,
gint steps, gint *cx, gint *cy);
static void darken_bezier_line(guchar *buffer, gint width, gint bytes,
gint x_offset, gint y_offset, gint steps,
gint *cx, gint *cy, gdouble delta);
static void lighten_bezier_line(guchar *buffer, gint width, gint bytes,
gint x_offset, gint y_offset, gint steps,
gint *cx, gint *cy, gdouble delta);
static void draw_bezier_vertical_border(guchar *buffer, gint width,
gint height, gint bytes,
gint x_offset, gint xtiles,
gint ytiles, gint blend_lines,
gdouble blend_amount, gint steps);
static void draw_bezier_horizontal_border(guchar *buffer, gint width,
gint height, gint bytes,
gint x_offset, gint xtiles,
gint ytiles, gint blend_lines,
gdouble blend_amount, gint steps);
static void check_config(gint width, gint height);
gint *px, gint *py, gdouble delta,
gboolean preview_mode);
static void draw_right_bump (guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gboolean preview_mode);
static void draw_left_bump (guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gboolean preview_mode);
static void draw_up_bump (guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gboolean preview_mode);
static void draw_down_bump (guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gboolean preview_mode);
static void darken_right_bump (guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void lighten_right_bump (guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void darken_left_bump (guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void lighten_left_bump (guchar *buffer, gint width, gint bytes,
gint x_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void darken_up_bump (guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offest,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void lighten_up_bump (guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void darken_down_bump (guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void lighten_down_bump (guchar *buffer, gint width, gint bytes,
gint y_offset, gint curve_start_offset,
gint steps, gdouble delta, gint counter,
gboolean preview_mode);
static void generate_grid (gint width, gint height, gint xtiles, gint ytiles,
gint *x, gint *y);
static void generate_bezier (gint px[4], gint py[4], gint steps,
gint *cachex, gint *cachey);
static void malloc_cache (void);
static void free_cache (void);
static void init_right_bump (gint width, gint height);
static void init_left_bump (gint width, gint height);
static void init_up_bump (gint width, gint height);
static void init_down_bump (gint width, gint height);
static void draw_bezier_line (guchar *buffer, gint width, gint bytes,
gint steps, gint *cx, gint *cy,
gboolean preview_mode);
static void darken_bezier_line (guchar *buffer, gint width, gint bytes,
gint x_offset, gint y_offset, gint steps,
gint *cx, gint *cy, gdouble delta,
gboolean preview_mode);
static void lighten_bezier_line (guchar *buffer, gint width, gint bytes,
gint x_offset, gint y_offset, gint steps,
gint *cx, gint *cy, gdouble delta,
gboolean preview_mode);
static void draw_bezier_vertical_border (guchar *buffer, gint width,
gint height, gint bytes,
gint x_offset, gint xtiles,
gint ytiles, gint blend_lines,
gdouble blend_amount, gint steps,
gboolean preview_mode);
static void draw_bezier_horizontal_border (guchar *buffer, gint width,
gint height, gint bytes,
gint x_offset, gint xtiles,
gint ytiles, gint blend_lines,
gdouble blend_amount, gint steps,
gboolean preview_mode);
static void check_config (gint width, gint height);
......@@ -481,27 +502,28 @@ jigsaw (gboolean preview_mode)
width = GTK_PREVIEW (preview)->buffer_width;
height = GTK_PREVIEW (preview)->buffer_height;
bytes = GTK_PREVIEW (preview)->bpp;
buffer_size = GTK_PREVIEW (preview)->rowstride * height;
}
else
{
width = drawable->width;
height = drawable->height;
bytes = drawable->bpp;
buffer_size = bytes * width * height;
}
/* setup image buffer */
buffer_size = bytes * width * height;
buffer = g_malloc(buffer_size);
buffer = g_malloc (buffer_size);
if (preview_mode)
{
memcpy(buffer, preview_bits, buffer_size);
memcpy (buffer, preview_bits, buffer_size);
}
else
{
gimp_pixel_rgn_init(&src_pr, drawable, 0, 0, width, height, FALSE, FALSE);
gimp_pixel_rgn_init(&dest_pr, drawable, 0, 0, width, height, TRUE, TRUE);
gimp_pixel_rgn_get_rect(&src_pr, buffer, 0, 0, width, height);
gimp_pixel_rgn_init (&src_pr, drawable, 0, 0, width, height, FALSE, FALSE);
gimp_pixel_rgn_init (&dest_pr, drawable, 0, 0, width, height, TRUE, TRUE);
gimp_pixel_rgn_get_rect (&src_pr, buffer, 0, 0, width, height);
}
check_config (width, height);
......@@ -521,10 +543,10 @@ jigsaw (gboolean preview_mode)
}
else
{
gimp_pixel_rgn_set_rect(&dest_pr, buffer, 0, 0, width, height);
gimp_drawable_flush(drawable);
gimp_drawable_merge_shadow(drawable->id, TRUE);
gimp_drawable_update(drawable->id, 0, 0, width, height);
gimp_pixel_rgn_set_rect (&dest_pr, buffer, 0, 0, width, height);
gimp_drawable_flush (drawable);
gimp_drawable_merge_shadow (drawable->id, TRUE);
gimp_drawable_update (drawable->id, 0, 0, width, height);
}
g_free(buffer);
......@@ -584,31 +606,31 @@ draw_jigsaw (guchar *buffer,
style_t style = config.style;
gint progress_total = xlines + ylines - 1;
globals.gridx = g_malloc(sizeof(gint) * xtiles);
globals.gridy = g_malloc(sizeof(gint) * ytiles);
globals.gridx = g_new (gint, xtiles);
globals.gridy = g_new (gint, ytiles);
x = globals.gridx;
y = globals.gridy;
generate_grid(width, height, xtiles, ytiles, globals.gridx, globals.gridy);
init_right_bump(width, height);
init_left_bump(width, height);
init_up_bump(width, height);
init_down_bump(width, height);
generate_grid (width, height, xtiles, ytiles, globals.gridx, globals.gridy);
init_right_bump (width, height);
init_left_bump (width, height);
init_up_bump (width, height);
init_down_bump (width, height);
if (style == BEZIER_1)
{
for (i = 0; i < xlines; i++)
{
draw_vertical_border(buffer, width, height, bytes, x[i], ytiles,
blend_lines, blend_amount);
draw_vertical_border (buffer, width, height, bytes, x[i], ytiles,
blend_lines, blend_amount, preview_mode);
if (!preview_mode)
gimp_progress_update ((gdouble) i / (gdouble) progress_total);
}
for (i = 0; i < ylines; i++)
{
draw_horizontal_border(buffer, width, bytes, y[i], xtiles,
blend_lines, blend_amount);
draw_horizontal_border (buffer, width, bytes, y[i], xtiles,
blend_lines, blend_amount, preview_mode);
if (!preview_mode)
gimp_progress_update ((gdouble) (i + xlines) / (gdouble) progress_total);
}
......@@ -617,17 +639,17 @@ draw_jigsaw (guchar *buffer,
{
for (i = 0; i < xlines; i++)
{
draw_bezier_vertical_border(buffer, width, height, bytes, x[i],
xtiles, ytiles, blend_lines,
blend_amount, steps);
draw_bezier_vertical_border (buffer, width, height, bytes, x[i],
xtiles, ytiles, blend_lines,
blend_amount, steps, preview_mode);
if (!preview_mode)
gimp_progress_update ((gdouble) i / (gdouble) progress_total);
}
for (i = 0; i < ylines; i++)
{
draw_bezier_horizontal_border(buffer, width, height, bytes, y[i],
xtiles, ytiles, blend_lines,
blend_amount, steps);
draw_bezier_horizontal_border (buffer, width, height, bytes, y[i],
xtiles, ytiles, blend_lines,
blend_amount, steps, preview_mode);
if (!preview_mode)
gimp_progress_update ((gdouble) (i + xlines) / (gdouble) progress_total);
}
......@@ -645,14 +667,15 @@ draw_jigsaw (guchar *buffer,
}
static void
draw_vertical_border (guchar *buffer,
gint width,
gint height,
gint bytes,
gint x_offset,
gint ytiles,
gint blend_lines,
gdouble blend_amount)
draw_vertical_border (guchar *buffer,
gint width,
gint height,
gint bytes,
gint x_offset,
gint ytiles,
gint blend_lines,
gdouble blend_amount,
gboolean preview_mode)
{
gint i, j;
gint tile_height = height / ytiles;
......@@ -682,7 +705,7 @@ draw_vertical_border (guchar *buffer,
/* first straight line from top downwards */
px[0] = px[1] = x_offset;
py[0] = y_offset; py[1] = y_offset + curve_start_offset - 1;
draw_vertical_line(buffer, width, bytes, px, py);
draw_vertical_line (buffer, width, bytes, px, py, preview_mode);
delta = blend_amount;
dy[0] = ly[0] = py[0]; dy[1] = ly[1] = py[1];
if (!right)
......@@ -693,48 +716,48 @@ draw_vertical_border (guchar *buffer,
{
dy[0]++; dy[1]--; ly[0]++; ly[1]--;
px[0] = x_offset - j - 1;
darken_vertical_line(buffer, width, bytes, px, dy, delta);
darken_vertical_line (buffer, width, bytes, px, dy, delta, preview_mode);
px[0] = x_offset + j + 1;
lighten_vertical_line(buffer, width, bytes, px, ly, delta);
lighten_vertical_line (buffer, width, bytes, px, ly, delta, preview_mode);
delta -= sigma;
}
/* top half of curve */
if (right)
{
draw_right_bump(buffer, width, bytes, x_offset,
y_offset + curve_start_offset,
globals.steps[RIGHT]);
draw_right_bump (buffer, width, bytes, x_offset,
y_offset + curve_start_offset,
globals.steps[RIGHT], preview_mode);
delta = blend_amount;
for (j = 0; j < blend_lines; j++)
{
/* use to be -j -1 */
darken_right_bump(buffer, width, bytes, x_offset,
y_offset + curve_start_offset,
globals.steps[RIGHT], delta, j);
/* use to be +j + 1 */
lighten_right_bump(buffer, width, bytes, x_offset,
darken_right_bump (buffer, width, bytes, x_offset,
y_offset + curve_start_offset,
globals.steps[RIGHT], delta, j);
globals.steps[RIGHT], delta, j, preview_mode);
/* use to be +j + 1 */
lighten_right_bump (buffer, width, bytes, x_offset,
y_offset + curve_start_offset,
globals.steps[RIGHT], delta, j, preview_mode);
delta -= sigma;
}