mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-22 04:28:05 +08:00
Rollback changes in BitmapCache
This commit is contained in:
parent
3bc7580e8c
commit
d82505984a
@ -88,10 +88,7 @@ wxBitmap* BitmapCache::insert(const std::string &bitmap_key, std::vector<wxBitma
|
|||||||
|
|
||||||
wxMemoryDC memDC;
|
wxMemoryDC memDC;
|
||||||
memDC.SelectObject(*bitmap);
|
memDC.SelectObject(*bitmap);
|
||||||
#ifdef __WXGTK__
|
|
||||||
#else
|
|
||||||
memDC.SetBackground(*wxTRANSPARENT_BRUSH);
|
memDC.SetBackground(*wxTRANSPARENT_BRUSH);
|
||||||
#endif
|
|
||||||
memDC.Clear();
|
memDC.Clear();
|
||||||
size_t x = 0;
|
size_t x = 0;
|
||||||
for (wxBitmap &bmp : bmps) {
|
for (wxBitmap &bmp : bmps) {
|
||||||
|
@ -31,10 +31,7 @@ public:
|
|||||||
|
|
||||||
static wxBitmap mksolid(size_t width, size_t height, unsigned char r, unsigned char g, unsigned char b, unsigned char transparency);
|
static wxBitmap mksolid(size_t width, size_t height, unsigned char r, unsigned char g, unsigned char b, unsigned char transparency);
|
||||||
static wxBitmap mksolid(size_t width, size_t height, const unsigned char rgb[3]) { return mksolid(width, height, rgb[0], rgb[1], rgb[2], wxALPHA_OPAQUE); }
|
static wxBitmap mksolid(size_t width, size_t height, const unsigned char rgb[3]) { return mksolid(width, height, rgb[0], rgb[1], rgb[2], wxALPHA_OPAQUE); }
|
||||||
static wxBitmap mkclear(size_t width, size_t height) {
|
static wxBitmap mkclear(size_t width, size_t height) { return mksolid(width, height, 0, 0, 0, wxALPHA_TRANSPARENT); }
|
||||||
wxColour bg_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
|
||||||
return mksolid(width, height, bg_clr.Red(), bg_clr.Green(), bg_clr.Blue()/*, 0, 0, 0*/, wxALPHA_TRANSPARENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<std::string, wxBitmap*> m_map;
|
std::map<std::string, wxBitmap*> m_map;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user