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.
This commit is contained in:
Sven Neumann 2003-05-20 13:40:33 +00:00 committed by Sven Neumann
parent 4e335f7fc2
commit a996ba3956
3 changed files with 28 additions and 4 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -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);
}

View File

@ -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);
}