[gimp] app: orient the spiral op line controller so that 0-degree rotation points right
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: orient the spiral op line controller so that 0-degree rotation points right
- Date: Sun, 2 Jul 2017 23:14:52 +0000 (UTC)
commit 9de19a1f9a81586e59f4401199358fc5782e436d
Author: Ell <ell_se yahoo com>
Date: Sun Jul 2 19:10:56 2017 -0400
app: orient the spiral op line controller so that 0-degree rotation points right
This way, it runs to the middle of the spiral arm, and stays centered
even when balance != 0.
app/widgets/gimppropgui-spiral.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimppropgui-spiral.c b/app/widgets/gimppropgui-spiral.c
index a0d652c..307a638 100644
--- a/app/widgets/gimppropgui-spiral.c
+++ b/app/widgets/gimppropgui-spiral.c
@@ -56,7 +56,7 @@ line_callback (GObject *config,
x = x1 / area->width;
y = y1 / area->height;
radius = sqrt (SQR (x2 - x1) + SQR (y2 - y1));
- rotation = atan2 (x2 - x1, y2 - y1) * 180 / G_PI;
+ rotation = atan2 (-(y2 - y1), x2 - x1) * 180 / G_PI;
if (rotation < 0)
rotation += 360.0;
@@ -93,8 +93,8 @@ config_notify (GObject *config,
x1 = x * area->width;
y1 = y * area->height;
- x2 = x1 + sin (rotation * (G_PI / 180.0)) * radius;
- y2 = y1 + cos (rotation * (G_PI / 180.0)) * radius;
+ x2 = x1 + cos (rotation * (G_PI / 180.0)) * radius;
+ y2 = y1 - sin (rotation * (G_PI / 180.0)) * radius;
set_func (set_data, area, x1, y1, x2, y2);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]