Added wxGraphicsBitmap::ConvertToImage().

Allow to convert wxGraphicsBitmap directly to wxImage, without passing by
wxBitmap.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-10-09 22:07:07 +00:00
parent 5f606e6515
commit 08b2d55fdf
4 changed files with 222 additions and 0 deletions

View File

@@ -19,6 +19,7 @@
#include "wx/geometry.h"
#include "wx/dynarray.h"
#include "wx/dc.h"
#include "wx/image.h"
#include "wx/vector.h"
enum wxAntialiasMode
@@ -166,6 +167,14 @@ class WXDLLIMPEXP_CORE wxGraphicsBitmap : public wxGraphicsObject
public:
wxGraphicsBitmap() {}
virtual ~wxGraphicsBitmap() {}
// Convert bitmap to wxImage: this is more efficient than converting to
// wxBitmap first and then to wxImage and also works without X server
// connection under Unix that wxBitmap requires.
#if wxUSE_IMAGE
wxImage ConvertToImage() const;
#endif // wxUSE_IMAGE
private:
DECLARE_DYNAMIC_CLASS(wxGraphicsBitmap)
};