]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/graphics.h
Document MSW-only wxEVT_MOVING event.
[wxWidgets.git] / include / wx / graphics.h
index dc17baf0753548c39f39d0927166d516dce9e0d6..d385d7db029424368c5f9f4af54d7850935b019e 100644 (file)
@@ -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_