[gimp] app: s/gimp_hsv_to_rgb4/gimp_hsv_to_rgb/ in GimpCircle



commit 6fd8a362dfd9581649afcefb5992433b64765654
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jun 30 17:30:05 2014 +0200

    app: s/gimp_hsv_to_rgb4/gimp_hsv_to_rgb/ in GimpCircle

 app/widgets/gimpcircle.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpcircle.c b/app/widgets/gimpcircle.c
index 2f146c3..742aa44 100644
--- a/app/widgets/gimpcircle.c
+++ b/app/widgets/gimpcircle.c
@@ -515,9 +515,17 @@ gimp_circle_background_hsv (gdouble  angle,
                             gdouble  distance,
                             guchar  *rgb)
 {
-  gdouble v = 1 - sqrt (distance) / 4; /* it just looks nicer this way */
+  GimpHSV hsv;
+  GimpRGB color;
 
-  gimp_hsv_to_rgb4 (rgb, angle / (2.0 * G_PI), distance, v);
+  gimp_hsv_set (&hsv,
+                angle / (2.0 * G_PI),
+                distance,
+                1 - sqrt (distance) / 4 /* it just looks nicer this way */);
+
+  gimp_hsv_to_rgb (&hsv, &color);
+
+  gimp_rgb_get_uchar (&color, rgb, rgb + 1, rgb + 2);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]