Flatten filament preview bitmaps to opaque RGB for native labels

This commit is contained in:
Noisyfox committed 2026-10-15 23:25:23 +08:00
1 parent 78de3ad9cd
commit 206552674b
7 files changed
+69 -11

No files matched your search

+4 -4
View File
@@ -294,10 +294,10 @@ struct BitmapDC {
wxMemoryDC dc;
std::unique_ptr<wxGCDC> graphics;
BitmapDC(const wxSize& size, bool alpha) : bitmap(size){
#ifdef __WXOSX__
bitmap.UseAlpha();
#endif
// All previews are opaque after checkerboard compositing. RGB storage also
// prevents Windows GDI labels from leaving invalid alpha bytes for menus.
BitmapDC(const wxSize& size, bool alpha) : bitmap(size, 24)
{
dc.SelectObject(bitmap);
// Don't set white background - let the color patterns fill the entire area
dc.SetPen(*wxTRANSPARENT_PEN);