]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/graphics.cpp
Make BOM-detection code in wxConvAuto public.
[wxWidgets.git] / src / osx / carbon / graphics.cpp
index 5b50bb5ff70bd19a0e5360b4bddddd934fab6092..3a5306d1bb23de6cb550df9d5cba1c8a06705703 100644 (file)
@@ -1001,17 +1001,6 @@ wxMacCoreGraphicsBitmapData::~wxMacCoreGraphicsBitmapData()
     CGImageRelease( m_bitmap );
 }
 
-#if wxUSE_IMAGE
-
-wxImage wxGraphicsBitmap::ConvertToImage() const
-{
-    wxMacCoreGraphicsBitmapData* const
-        data = static_cast<wxMacCoreGraphicsBitmapData*>(GetRefData());
-
-    return data ? data->ConvertToImage() : wxNullImage;
-}
-
-#endif // wxUSE_IMAGE
 
 //
 // Graphics Matrix
@@ -2858,6 +2847,7 @@ public :
 
 #if wxUSE_IMAGE
     virtual wxGraphicsBitmap CreateBitmapFromImage(const wxImage& image);
+    virtual wxImage CreateImageFromBitmap(const wxGraphicsBitmap& bmp);
 #endif // wxUSE_IMAGE
 
     // create a graphics bitmap from a native bitmap
@@ -3049,6 +3039,14 @@ wxMacCoreGraphicsRenderer::CreateBitmapFromImage(const wxImage& image)
     return CreateBitmap(wxBitmap(image));
 }
 
+wxImage wxMacCoreGraphicsRenderer::CreateImageFromBitmap(const wxGraphicsBitmap& bmp)
+{
+    wxMacCoreGraphicsBitmapData* const
+        data = static_cast<wxMacCoreGraphicsBitmapData*>(bmp.GetRefData());
+
+    return data ? data->ConvertToImage() : wxNullImage;
+}
+
 #endif // wxUSE_IMAGE
 
 wxGraphicsBitmap wxMacCoreGraphicsRenderer::CreateBitmapFromNativeBitmap( void* bitmap )