]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/graphics.cpp
Disable some wxWebView tests that fail on the buildbot but not locally.
[wxWidgets.git] / src / msw / graphics.cpp
index e2065c05e9c7fb8bfc7938cc1bed3b75ba707a60..e5161c5d5bca3ca33d22dbc1e465b6d5a74e987d 100644 (file)
@@ -541,6 +541,7 @@ public :
     virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap );
 #if wxUSE_IMAGE
     virtual wxGraphicsBitmap CreateBitmapFromImage(const wxImage& image);
+    virtual wxImage CreateImageFromBitmap(const wxGraphicsBitmap& bmp);
 #endif // wxUSE_IMAGE
 
     virtual wxGraphicsFont CreateFont( const wxFont& font,
@@ -898,7 +899,7 @@ wxGDIPlusFontData::Init(const wxString& name,
                         const wxColour& col,
                         Unit fontUnit)
 {
-    m_font = new Font(name, size, style, fontUnit);
+    m_font = new Font(name.wc_str(), size, style, fontUnit);
 
     m_textBrush = new SolidBrush(wxColourToColor(col));
 }
@@ -1078,22 +1079,6 @@ wxGDIPlusBitmapData::~wxGDIPlusBitmapData()
     delete m_helper;
 }
 
-// ----------------------------------------------------------------------------
-// wxGraphicsBitmap implementation
-// ----------------------------------------------------------------------------
-
-#if wxUSE_IMAGE
-
-wxImage wxGraphicsBitmap::ConvertToImage() const
-{
-    const wxGDIPlusBitmapData* const
-        data = static_cast<wxGDIPlusBitmapData*>(GetGraphicsData());
-
-    return data ? data->ConvertToImage() : wxNullImage;
-}
-
-#endif // wxUSE_IMAGE
-
 //-----------------------------------------------------------------------------
 // wxGDIPlusPath implementation
 //-----------------------------------------------------------------------------
@@ -2194,8 +2179,19 @@ wxGraphicsBitmap wxGDIPlusRenderer::CreateBitmapFromImage(const wxImage& image)
         return wxNullGraphicsBitmap;
 }
 
+
+wxImage wxGDIPlusRenderer::CreateImageFromBitmap(const wxGraphicsBitmap& bmp)
+{
+    ENSURE_LOADED_OR_RETURN(wxNullImage);
+    const wxGDIPlusBitmapData* const
+        data = static_cast<wxGDIPlusBitmapData*>(bmp.GetGraphicsData());
+
+    return data ? data->ConvertToImage() : wxNullImage;
+}
+
 #endif // wxUSE_IMAGE
 
+
 wxGraphicsBitmap wxGDIPlusRenderer::CreateBitmapFromNativeBitmap( void *bitmap )
 {
     ENSURE_LOADED_OR_RETURN(wxNullGraphicsBitmap);