// Author: Stefan Csomor
// Modified by:
// Created:
-// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
}
}
+void * wxGraphicsBitmap::GetNativeBitmap() const
+{
+ return GetBitmapData()->GetNativeBitmap();
+}
+
//-----------------------------------------------------------------------------
// wxGraphicsContext Convenience Methods
//-----------------------------------------------------------------------------
// to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape
SetPen( wxNullGraphicsPen );
- wxGraphicsPath path = CreatePath();
- path.AddRectangle( x , y, width, height );
- FillPath( path );
+ DrawRectangle(x , y, width, height);
DrawText( str, x ,y);
SetBrush( formerBrush );
);
}
-// 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);
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();