Tech ENABLE_COLOR_CLASSES - 1st installment -> Introduction of classes ColorRGB and ColorRGBA to unify color data definition and manipulation

This commit is contained in:
enricoturri1966 2021-12-22 10:45:35 +01:00
parent 48098fbaff
commit cd4094743e
53 changed files with 1810 additions and 60 deletions
src/slic3r/GUI

View file

@ -1390,8 +1390,12 @@ boost::any& ColourPicker::get_value()
if (colour == wxTransparentColour)
m_value = std::string("");
else {
auto clr_str = wxString::Format(wxT("#%02X%02X%02X"), colour.Red(), colour.Green(), colour.Blue());
#if ENABLE_COLOR_CLASSES
m_value = encode_color(ColorRGB(colour.Red(), colour.Green(), colour.Blue()));
#else
auto clr_str = wxString::Format(wxT("#%02X%02X%02X"), colour.Red(), colour.Green(), colour.Blue());
m_value = clr_str.ToStdString();
#endif // ENABLE_COLOR_CLASSES
}
return m_value;
}