]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/graphics.h
Implement wxBG_STYLE_TRANSPARENT support for wxGTK.
[wxWidgets.git] / include / wx / graphics.h
index 398df5a4e4c72ffd4434c943a99acef49bee8b74..d385d7db029424368c5f9f4af54d7850935b019e 100644 (file)
@@ -490,8 +490,12 @@ public:
                               wxDouble xc, wxDouble yc, wxDouble radius,
                               const wxGraphicsGradientStops& stops) const;
 
-    // sets the font
+    // creates a font
     virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) const;
+    virtual wxGraphicsFont CreateFont(double sizeInPixels,
+                                      const wxString& facename,
+                                      int flags = wxFONTFLAG_DEFAULT,
+                                      const wxColour& col = *wxBLACK) const;
 
     // create a native bitmap representation
     virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) const;
@@ -829,11 +833,16 @@ public:
 
     // sets the font
     virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) = 0;
+    virtual wxGraphicsFont CreateFont(double sizeInPixels,
+                                      const wxString& facename,
+                                      int flags = wxFONTFLAG_DEFAULT,
+                                      const wxColour& col = *wxBLACK) = 0;
 
     // create a native bitmap representation
     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
@@ -847,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_