X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5548cbac13e21401e2ca395d4b2e7225e73167a3..038809c2f657f03d8688d7a75ca416878dfa0de7:/src/osx/carbon/graphics.cpp diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 5b50bb5ff7..3a5306d1bb 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -1001,17 +1001,6 @@ wxMacCoreGraphicsBitmapData::~wxMacCoreGraphicsBitmapData() CGImageRelease( m_bitmap ); } -#if wxUSE_IMAGE - -wxImage wxGraphicsBitmap::ConvertToImage() const -{ - wxMacCoreGraphicsBitmapData* const - data = static_cast(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(bmp.GetRefData()); + + return data ? data->ConvertToImage() : wxNullImage; +} + #endif // wxUSE_IMAGE wxGraphicsBitmap wxMacCoreGraphicsRenderer::CreateBitmapFromNativeBitmap( void* bitmap )