]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/graphcmn.cpp
remove unnecessary class definitions and variables
[wxWidgets.git] / src / common / graphcmn.cpp
index 8536a68762f3afbe930c6573bea7f41b34e1179c..33009406c435f68ba9edb0071aa210b419431585 100644 (file)
@@ -837,17 +837,32 @@ wxGraphicsContext::CreateRadialGradientBrush(
                           );
 }
 
-// sets the font
 wxGraphicsFont wxGraphicsContext::CreateFont( const wxFont &font , const wxColour &col ) const
 {
     return GetRenderer()->CreateFont(font,col);
 }
 
+wxGraphicsFont
+wxGraphicsContext::CreateFont(double size,
+                              const wxString& facename,
+                              int flags,
+                              const wxColour& col) const
+{
+    return GetRenderer()->CreateFont(size, facename, flags, col);
+}
+
 wxGraphicsBitmap wxGraphicsContext::CreateBitmap( const wxBitmap& bmp ) const
 {
     return GetRenderer()->CreateBitmap(bmp);
 }
 
+#if wxUSE_IMAGE
+wxGraphicsBitmap wxGraphicsContext::CreateBitmapFromImage(const wxImage& image) const
+{
+    return GetRenderer()->CreateBitmapFromImage(image);
+}
+#endif // wxUSE_IMAGE
+
 wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h   ) const
 {
     return GetRenderer()->CreateSubBitmap(bmp,x,y,w,h);
@@ -894,6 +909,13 @@ wxGraphicsContext* wxGraphicsContext::Create( wxWindow* window )
     return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(window);
 }
 
+#if wxUSE_IMAGE
+/* static */ wxGraphicsContext* wxGraphicsContext::Create(wxImage& image)
+{
+    return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromImage(image);
+}
+#endif // wxUSE_IMAGE
+
 wxGraphicsContext* wxGraphicsContext::Create()
 {
     return wxGraphicsRenderer::GetDefaultRenderer()->CreateMeasuringContext();