Transparency PNG
Posted: Sat Jun 22, 2019 1:35 am
I'm trying create a image png with transparency. Very basic...
But.. in the example bellow, i created a wxPanel black, and over it there are a image PNG with transparency. In true, part white in the image is a
PNG transparent, it's no white... I don't understand what is wrong. It's so basic.... Coul'd someone give one tip, please?
Panel_box = new wxPanel(newPanel, wxID_ANY,wxPoint(0,50),wxSize(200,100));
Panel_box->SetBackgroundColour(wxColor(0,0,0));
wxBitmap bmp;
bmp.LoadFile("image.png", wxBITMAP_TYPE_PNG);
ball = new wxButton(Panel_box, ID_ball, wxEmptyString, wxPoint(50,05), bmp.GetSize(), wxTRANSPARENT_WINDOW | wxBORDER_NONE);
ball->SetBitmap(bmp);
But.. in the example bellow, i created a wxPanel black, and over it there are a image PNG with transparency. In true, part white in the image is a
PNG transparent, it's no white... I don't understand what is wrong. It's so basic.... Coul'd someone give one tip, please?
Panel_box = new wxPanel(newPanel, wxID_ANY,wxPoint(0,50),wxSize(200,100));
Panel_box->SetBackgroundColour(wxColor(0,0,0));
wxBitmap bmp;
bmp.LoadFile("image.png", wxBITMAP_TYPE_PNG);
ball = new wxButton(Panel_box, ID_ball, wxEmptyString, wxPoint(50,05), bmp.GetSize(), wxTRANSPARENT_WINDOW | wxBORDER_NONE);
ball->SetBitmap(bmp);