Commit a996ba39 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

fixed algorithm for GIMP_ROTATE_180.

2003-05-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_rotate): fixed algorithm for
	GIMP_ROTATE_180.
parent 4e335f7f
2003-05-20 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_rotate): fixed algorithm for
GIMP_ROTATE_180.
2003-05-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-flip.c: no need to include gimp-intl.h.
......@@ -684,8 +684,17 @@ gimp_drawable_transform_tiles_rotate (GimpDrawable *drawable,
orig_width, buf, 1);
for (j = 0; j < orig_width / 2; j++)
for (k = 0; k < orig_bpp; k++)
buf[j * orig_bpp + k] = buf[(orig_width - 1 - j) * orig_bpp + k];
{
guchar *left = buf + j * orig_bpp;
guchar *right = buf + (orig_width - 1 - j) * orig_bpp;
for (k = 0; k < orig_bpp; k++)
{
guchar tmp = left[k];
left[k] = right[k];
right[k] = tmp;
}
}
pixel_region_set_row (&destPR, new_x, new_y + i, new_width, buf);
}
......
......@@ -684,8 +684,17 @@ gimp_drawable_transform_tiles_rotate (GimpDrawable *drawable,
orig_width, buf, 1);
for (j = 0; j < orig_width / 2; j++)
for (k = 0; k < orig_bpp; k++)
buf[j * orig_bpp + k] = buf[(orig_width - 1 - j) * orig_bpp + k];
{
guchar *left = buf + j * orig_bpp;
guchar *right = buf + (orig_width - 1 - j) * orig_bpp;
for (k = 0; k < orig_bpp; k++)
{
guchar tmp = left[k];
left[k] = right[k];
right[k] = tmp;
}
}
pixel_region_set_row (&destPR, new_x, new_y + i, new_width, buf);
}
......
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