#include "Color.h"
-#include "support/LAssert.h"
-
#include "lyx_forms.h"
-#include "support/std_sstream.h"
+#include "LColor.h"
#include <cmath>
+#include <sstream>
#include <iomanip>
-namespace support = lyx::support;
-
#ifndef CXX_GLOBAL_CSTD
using std::floor;
#endif
using std::istringstream;
using std::ostringstream;
+using std::string;
+namespace lyx {
+namespace frontend {
namespace {
-bool getRGBColor(LColor::color col,
+bool getRGBColor(LColor_color col,
unsigned int & r, unsigned int & g, unsigned int & b)
{
string const name = lcolor.getX11Name(col);
<< setw(2) << col.g
<< setw(2) << col.b;
- return STRCONV(ostr.str());
+ return ostr.str();
}
RGBColor::RGBColor(string const & x11hexname)
- : r(0), g(0), b(0)
+ : r(0), g(0), b(0)
{
- support::Assert(x11hexname.size() == 7 && x11hexname[0] == '#');
+ BOOST_ASSERT(x11hexname.size() == 7 && x11hexname[0] == '#');
r = hexstrToInt(x11hexname.substr(1,2));
g = hexstrToInt(x11hexname.substr(3,2));
b = hexstrToInt(x11hexname.substr(5,2));
h += 360;
}
}
+
+} // namespace frontend
+} // namespace lyx