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:
@@ -842,6 +842,7 @@ public:
|
||||
virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) = 0;
|
||||
#if wxUSE_IMAGE
|
||||
virtual wxGraphicsBitmap CreateBitmapFromImage(const wxImage& image) = 0;
|
||||
virtual wxImage CreateImageFromBitmap(const wxGraphicsBitmap& bmp) = 0;
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
// create a graphics bitmap from a native bitmap
|
||||
@@ -855,6 +856,16 @@ private:
|
||||
DECLARE_ABSTRACT_CLASS(wxGraphicsRenderer)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
inline
|
||||
wxImage wxGraphicsBitmap::ConvertToImage() const
|
||||
{
|
||||
wxGraphicsRenderer* renderer = GetRenderer();
|
||||
return renderer ? renderer->CreateImageFromBitmap(*this) : wxNullImage;
|
||||
}
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
#endif // wxUSE_GRAPHICS_CONTEXT
|
||||
|
||||
#endif // _WX_GRAPHICS_H_
|
||||
|
Reference in New Issue
Block a user