Since Scintilla uses XMP internally which doesn't support alpha, check
if the images have alpha and convert to a mask. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -517,6 +517,8 @@ void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp)
|
||||
// convert bmp to a xpm in a string
|
||||
wxMemoryOutputStream strm;
|
||||
wxImage img = bmp.ConvertToImage();
|
||||
if (img.HasAlpha())
|
||||
img.ConvertAlphaToMask();
|
||||
img.SaveFile(strm, wxBITMAP_TYPE_XPM);
|
||||
size_t len = strm.GetSize();
|
||||
char* buff = new char[len+1];
|
||||
@@ -896,6 +898,8 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) {
|
||||
// convert bmp to a xpm in a string
|
||||
wxMemoryOutputStream strm;
|
||||
wxImage img = bmp.ConvertToImage();
|
||||
if (img.HasAlpha())
|
||||
img.ConvertAlphaToMask();
|
||||
img.SaveFile(strm, wxBITMAP_TYPE_XPM);
|
||||
size_t len = strm.GetSize();
|
||||
char* buff = new char[len+1];
|
||||
|
Reference in New Issue
Block a user