From 40033c7632430d9787b9cf1115ac86693dedf177 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Sun, 30 Aug 2020 00:03:32 -0700 Subject: [PATCH] Shapes rotation improvement with centered too Avoid shapes flipping upside-down during rotation step, when stretching from right-to-left -- also when using the original, center-based shape stretching mode. --- src/tuxpaint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index dcef231c0..7f7de9f94 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - June 14, 2002 - August 28, 2020 + June 14, 2002 - August 30, 2020 */ @@ -13262,7 +13262,7 @@ static int shape_rotation(int ctr_x, int ctr_y, int ox, int oy) deg = (atan2(oy - ctr_y, ox - ctr_x) * 180 / M_PI); - if (shape_reverse && shape_mode == SHAPEMODE_CORNER) { + if (shape_reverse) { deg = (deg + 180) % 360; }