]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/stc.cpp
regenerated after version.bkl changes fixing -compatibility_version for Darwin
[wxWidgets.git] / contrib / src / stc / stc.cpp
index b003480d48b570c671cb09d6ca3f5508854fb17c..6f580d79414b02969f0caf3c7c88e6901c56fa24 100644 (file)
@@ -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];
@@ -2529,7 +2533,7 @@ void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
     bool           bold     = font.GetWeight() == wxBOLD;
     bool           italic   = font.GetStyle() != wxNORMAL;
     bool           under    = font.GetUnderlined();
-    wxFontEncoding encoding = font.GetDefaultEncoding();
+    wxFontEncoding encoding = font.GetEncoding();
     
     StyleSetFontAttr(styleNum, size, faceName, bold, italic, under, encoding);
 }