ObjectDataViewModel is extracted from wxExtentions to the separated file

+ parse_color function is moved to BitmapCache from PresetBundle
This commit is contained in:
YuSanka 2020-02-02 22:22:40 +01:00
parent eb6e0c06e4
commit 3f7ebee396
12 changed files with 2325 additions and 2398 deletions

View file

@ -6,11 +6,6 @@
#include <wx/wx.h>
#endif
#include "libslic3r/libslic3r.h"
#include "libslic3r/Config.hpp"
#include "GUI.hpp"
namespace Slic3r { namespace GUI {
class BitmapCache
@ -41,6 +36,8 @@ public:
/*static */wxBitmap mksolid(size_t width, size_t height, const unsigned char rgb[3], bool suppress_scaling = false) { return mksolid(width, height, rgb[0], rgb[1], rgb[2], wxALPHA_OPAQUE); }
/*static */wxBitmap mkclear(size_t width, size_t height) { return mksolid(width, height, 0, 0, 0, wxALPHA_TRANSPARENT); }
static bool parse_color(const std::string& scolor, unsigned char* rgb_out);
private:
std::map<std::string, wxBitmap*> m_map;
double m_gs = 0.2; // value, used for image.ConvertToGreyscale(m_gs, m_gs, m_gs)