* mln/value/qt/rgb32.hh: Here.
---
milena/ChangeLog | 6 ++++++
milena/mln/value/qt/rgb32.hh | 48 +++++++++++++++++++++---------------------
2 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 93c5893..a402ccd 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2013-06-20 Roland Levillain <roland(a)lrde.epita.fr>
+ Resolve ambiguous calls to operator* in value::qt::rgb32.
+
+ * mln/value/qt/rgb32.hh: Here.
+
+2013-06-20 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix mln::value::hsl_'s dependencies.
* mln/value/hsl.hh: Here.
diff --git a/milena/mln/value/qt/rgb32.hh b/milena/mln/value/qt/rgb32.hh
index f26c070..361702c 100644
--- a/milena/mln/value/qt/rgb32.hh
+++ b/milena/mln/value/qt/rgb32.hh
@@ -468,27 +468,27 @@ namespace mln
inline
rgb32::rgb32(const mln::literal::light_gray_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.75);
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.75);
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.75);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) * 3 / 4;
+ this->v_[1] = unsigned(mln_max(int_u<8>)) * 3 / 4;
+ this->v_[2] = unsigned(mln_max(int_u<8>)) * 3 / 4;
}
inline
rgb32::rgb32(const mln::literal::medium_gray_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.50);
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.50);
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.50);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) / 2;
+ this->v_[1] = unsigned(mln_max(int_u<8>)) / 2;
+ this->v_[2] = unsigned(mln_max(int_u<8>)) / 2;
}
inline
rgb32::rgb32(const mln::literal::dark_gray_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.25);
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.25);
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.25);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) / 4;
+ this->v_[1] = unsigned(mln_max(int_u<8>)) / 4;
+ this->v_[2] = unsigned(mln_max(int_u<8>)) / 4;
}
@@ -522,9 +522,9 @@ namespace mln
inline
rgb32::rgb32(const mln::literal::brown_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.25);
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.50);
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.75);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) / 4;
+ this->v_[1] = unsigned(mln_max(int_u<8>)) / 2;
+ this->v_[2] = unsigned(mln_max(int_u<8>)) * 3 / 4;
}
@@ -533,7 +533,7 @@ namespace mln
{
this->v_[0] = 0;
this->v_[1] = mln_max(int_u<8>);
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.75);
+ this->v_[2] = unsigned(mln_max(int_u<8>)) * 3 / 4;
}
@@ -541,7 +541,7 @@ namespace mln
rgb32::rgb32(const mln::literal::orange_t&)
{
this->v_[0] = 0;
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.50);
+ this->v_[1] = unsigned(mln_max(int_u<8>)) / 2;
this->v_[2] = mln_max(int_u<8>);
}
@@ -549,8 +549,8 @@ namespace mln
inline
rgb32::rgb32(const mln::literal::pink_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.75);
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.75);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) * 3 / 4;
+ this->v_[1] = unsigned(mln_max(int_u<8>)) * 3 / 4;
this->v_[2] = mln_max(int_u<8>);
}
@@ -558,17 +558,17 @@ namespace mln
inline
rgb32::rgb32(const mln::literal::purple_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.25);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) / 4;
this->v_[1] = 0;
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.75);
+ this->v_[2] = unsigned(mln_max(int_u<8>)) * 3 / 4;
}
inline
rgb32::rgb32(const mln::literal::teal_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.50);
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.50);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) / 2;
+ this->v_[1] = unsigned(mln_max(int_u<8>)) / 2;
this->v_[2] = 0;
}
@@ -576,9 +576,9 @@ namespace mln
inline
rgb32::rgb32(const mln::literal::violet_t&)
{
- this->v_[0] = unsigned(mln_max(int_u<8>) * 0.50);
+ this->v_[0] = unsigned(mln_max(int_u<8>)) / 2;
this->v_[1] = 0;
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.50);
+ this->v_[2] = unsigned(mln_max(int_u<8>)) / 2;
}
@@ -613,8 +613,8 @@ namespace mln
rgb32::rgb32(const mln::literal::olive_t&)
{
this->v_[0] = 0;
- this->v_[1] = unsigned(mln_max(int_u<8>) * 0.50);
- this->v_[2] = unsigned(mln_max(int_u<8>) * 0.50);
+ this->v_[1] = unsigned(mln_max(int_u<8>)) / 2;
+ this->v_[2] = unsigned(mln_max(int_u<8>)) / 2;
}
--
1.7.10.4