Bug 662219 Rotate does not rotate; the image is ...

gone except for a small rectangle

atan2 returns an angle between -pi, pi. Here it is needed
between 0, 2pi. Simpler to invert both axes.
This commit is contained in:
Massimo Valentini 2011-11-02 17:49:49 +01:00
parent 5e015aebba
commit 834225803a
1 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@ gimp_transform_resize_crop (gdouble dx1,
points[0] = points[min];
points[min] = t;
for (i = 1; i < 4; i++)
for (i = 1; i < 3; i++)
{
gdouble min_theta;
gdouble min_mag;
@ -318,7 +318,7 @@ gimp_transform_resize_crop (gdouble dx1,
break;
}
theta = atan2 (sy, sx);
theta = atan2 (-sy, -sx);
mag = (sx * sx) + (sy * sy);
if ((theta < min_theta) ||