Delegate wxGraphicsBitmap::ConvertToImage to the renderer so we do not end up with more than one definition of the method when building with both the GDI+ GC and the Cairo GC enabled at the same time.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-10-20 04:49:12 +00:00
parent c9b7d15bbb
commit 6e6f074b45
5 changed files with 53 additions and 45 deletions

View 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 )