]> Pileus Git - ~andy/gtk/commitdiff
GtkHSV: remove an unused function
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 20 Feb 2012 10:44:05 +0000 (11:44 +0100)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 20 Feb 2012 10:44:51 +0000 (11:44 +0100)
gtk/deprecated/gtkhsv.c

index 3fac2e136a34db912c81ccafee96318b736318c3..aefc4d424a77b6dc0db6c43dd7635c260f4d58ac 100644 (file)
@@ -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,