[gtk+] GtkHSV: remove an unused function
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkHSV: remove an unused function
- Date: Mon, 20 Feb 2012 10:45:14 +0000 (UTC)
commit e6a8beba9de045a4697de9d4fd64822311cec7b0
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Feb 20 11:44:05 2012 +0100
GtkHSV: remove an unused function
gtk/deprecated/gtkhsv.c | 75 -----------------------------------------------
1 files changed, 0 insertions(+), 75 deletions(-)
---
diff --git a/gtk/deprecated/gtkhsv.c b/gtk/deprecated/gtkhsv.c
index 3fac2e1..aefc4d4 100644
--- a/gtk/deprecated/gtkhsv.c
+++ b/gtk/deprecated/gtkhsv.c
@@ -423,81 +423,6 @@ hsv_to_rgb (gdouble *h,
}
}
-/* Converts from RGB to HSV */
-static void
-rgb_to_hsv (gdouble *r,
- gdouble *g,
- gdouble *b)
-{
- gdouble red, green, blue;
- gdouble h, s, v;
- gdouble min, max;
- gdouble delta;
-
- red = *r;
- green = *g;
- blue = *b;
-
- h = 0.0;
-
- if (red > green)
- {
- if (red > blue)
- max = red;
- else
- max = blue;
-
- if (green < blue)
- min = green;
- else
- min = blue;
- }
- else
- {
- if (green > blue)
- max = green;
- else
- max = blue;
-
- if (red < blue)
- min = red;
- else
- min = blue;
- }
-
- v = max;
-
- if (max != 0.0)
- s = (max - min) / max;
- else
- s = 0.0;
-
- if (s == 0.0)
- h = 0.0;
- else
- {
- delta = max - min;
-
- if (red == max)
- h = (green - blue) / delta;
- else if (green == max)
- h = 2 + (blue - red) / delta;
- else if (blue == max)
- h = 4 + (red - green) / delta;
-
- h /= 6.0;
-
- if (h < 0.0)
- h += 1.0;
- else if (h > 1.0)
- h -= 1.0;
- }
-
- *r = h;
- *g = s;
- *b = v;
-}
-
/* Computes the vertices of the saturation/value triangle */
static void
compute_triangle (GtkHSV *hsv,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]