X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5bd09bf48eb5eb8cff8ecadb837c4f06df61abb..5cf1cb1006d6b5762d96c07ee3892883607460c7:/contrib/src/stc/stc.cpp diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index 86a9690efb..ccf561d44c 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -17,11 +17,11 @@ #include -#include -#include -#include -#include -#include +#include "wx/wx.h" +#include "wx/tokenzr.h" +#include "wx/mstream.h" +#include "wx/image.h" +#include "wx/file.h" #include "wx/stc/stc.h" #include "ScintillaWX.h" @@ -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];