---
milena/ChangeLog | 4 ++++
milena/mln/labeling/colorize.hh | 26 ++++++++++++++++++++++----
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index ec2ef35..66c1c51 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/labeling/colorize.hh: Add support for value::qt::rgb32.
+
2010-02-19 Guillaume Lazzara <z(a)lrde.epita.fr>
Small fixes in Milena.
diff --git a/milena/mln/labeling/colorize.hh b/milena/mln/labeling/colorize.hh
index 69493d5..b25aa35 100644
--- a/milena/mln/labeling/colorize.hh
+++ b/milena/mln/labeling/colorize.hh
@@ -114,9 +114,9 @@ namespace mln
V random_color(const V&);
- template <unsigned n>
- mln::value::rgb<n>
- random_color(const mln::value::rgb<n>&)
+ template <typename RGB>
+ RGB
+ random_color_rgb(const RGB&)
{
static unsigned
nelements = colorize_::max_value - colorize_::min_value + 1;
@@ -153,9 +153,27 @@ namespace mln
while (green_[green - colorize_::min_value].has(blue));
green_[green - colorize_::min_value].insert(blue);
- return mln::value::rgb<n>(red, green, blue);
+ return RGB(red, green, blue);
+ }
+
+ template <unsigned n>
+ mln::value::rgb<n>
+ random_color(const mln::value::rgb<n>& v)
+ {
+ return random_color_rgb(v);
}
+
+# ifdef MLN_VALUE_QT_RGB32_HH
+
+ mln::value::qt::rgb32
+ random_color(const mln::value::qt::rgb32& v)
+ {
+ return random_color_rgb(v);
+ }
+
+# endif // ! MLN_VALUE_QT_RGB32_HH
+
}
template <typename V, typename L>
--
1.5.6.5
Show replies by date