Commit 9bb6ea89 authored by EDT 1998  Matthew Wilson's avatar EDT 1998 Matthew Wilson Committed by Matt Wilson

fix by sjburges to fix grid on selections. --matt

Sat May 30 02:03:19 EDT 1998  Matthew Wilson  <msw@gimp.org>

	* plug-ins/grid/grid.c: fix by sjburges to fix grid on selections.
--matt
parent a656b146
Sat May 30 02:03:19 EDT 1998 Matthew Wilson <msw@gimp.org>
* plug-ins/grid/grid.c: fix by sjburges to fix grid on selections.
Fri May 29 23:34:07 EDT 1998 Matthew Wilson <msw@gimp.org>
* plug-ins/gaus_iir/gauss_iir.c: fix by sjburges to fix horiz
......
......@@ -191,7 +191,7 @@ doit (GDrawable * drawable)
height = drawable->height;
bytes = drawable->bpp;
if (gimp_drawable_has_alpha (drawable->id))
if (gimp_drawable_has_alpha (drawable->id))
{
color[bytes - 1] = 0xff;
}
......@@ -202,33 +202,34 @@ doit (GDrawable * drawable)
/* First off, copy the old one to the new one. */
copybuf = malloc (width * bytes);
for (h = sy1; h < sy2; h++)
{
gimp_pixel_rgn_get_row (&srcPR, copybuf, sx1, h, width);
gimp_pixel_rgn_get_row (&srcPR, copybuf, sx1, h, (sx2-sx1));
if ((h - my_config.y_offset) % my_config.height == 0)
{
{ /* Draw row */
for (w = sx1; w < sx2; w++)
{
for (b = 0; b < bytes; b++)
{
copybuf[w * bytes + b] = color[b];
copybuf[(w-sx1) * bytes + b] = color[b];
}
}
}
else
{
{ /* Just copy shit */
for (w = sx1; w < sx2; w++)
{
if ((w - my_config.x_offset) % my_config.width == 0)
{
for (b = 0; b < bytes; b++)
{
copybuf[w * bytes + b] = color[b];
copybuf[(w-sx1) * bytes + b] = color[b];
}
}
}
}
gimp_pixel_rgn_set_row (&destPR, copybuf, sx1, h, width);
gimp_pixel_rgn_set_row (&destPR, copybuf, sx1, h , (sx2-sx1) );
gimp_progress_update ((double) h / (double) (sy2 - sy1));
}
free (copybuf);
......
......@@ -191,7 +191,7 @@ doit (GDrawable * drawable)
height = drawable->height;
bytes = drawable->bpp;
if (gimp_drawable_has_alpha (drawable->id))
if (gimp_drawable_has_alpha (drawable->id))
{
color[bytes - 1] = 0xff;
}
......@@ -202,33 +202,34 @@ doit (GDrawable * drawable)
/* First off, copy the old one to the new one. */
copybuf = malloc (width * bytes);
for (h = sy1; h < sy2; h++)
{
gimp_pixel_rgn_get_row (&srcPR, copybuf, sx1, h, width);
gimp_pixel_rgn_get_row (&srcPR, copybuf, sx1, h, (sx2-sx1));
if ((h - my_config.y_offset) % my_config.height == 0)
{
{ /* Draw row */
for (w = sx1; w < sx2; w++)
{
for (b = 0; b < bytes; b++)
{
copybuf[w * bytes + b] = color[b];
copybuf[(w-sx1) * bytes + b] = color[b];
}
}
}
else
{
{ /* Just copy shit */
for (w = sx1; w < sx2; w++)
{
if ((w - my_config.x_offset) % my_config.width == 0)
{
for (b = 0; b < bytes; b++)
{
copybuf[w * bytes + b] = color[b];
copybuf[(w-sx1) * bytes + b] = color[b];
}
}
}
}
gimp_pixel_rgn_set_row (&destPR, copybuf, sx1, h, width);
gimp_pixel_rgn_set_row (&destPR, copybuf, sx1, h , (sx2-sx1) );
gimp_progress_update ((double) h / (double) (sy2 - sy1));
}
free (copybuf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment