X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a4e73390a604cb78d41eacf3e97de48c36aaf8d7..12cc29c56a03723218b85becfc6b5a1a63e917e5:/include/wx/graphics.h?ds=sidebyside diff --git a/include/wx/graphics.h b/include/wx/graphics.h index 68eb3ca476..ef18b3ed15 100755 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -18,6 +18,7 @@ #include "wx/dynarray.h" class WXDLLIMPEXP_CORE wxWindowDC; +class WXDLLIMPEXP_CORE wxMemoryDC; class WXDLLIMPEXP_CORE wxGraphicsContext; class WXDLLIMPEXP_CORE wxGraphicsPath; class WXDLLIMPEXP_CORE wxGraphicsMatrix; @@ -387,12 +388,19 @@ public: static wxGraphicsContext* Create( const wxWindowDC& dc) ; +#ifdef __WXMSW__ + static wxGraphicsContext * Create( const wxMemoryDC& dc) ; +#endif + static wxGraphicsContext* CreateFromNative( void * context ) ; static wxGraphicsContext* CreateFromNativeWindow( void * window ) ; static wxGraphicsContext* Create( wxWindow* window ) ; + // create a context that can be used for measuring texts only, no drawing allowed + static wxGraphicsContext * Create(); + wxGraphicsPath CreatePath() const; virtual wxGraphicsPen CreatePen(const wxPen& pen) const; @@ -491,6 +499,10 @@ public: virtual void DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle ); + virtual void DrawText( const wxString &str, wxDouble x, wxDouble y, const wxGraphicsBrush& backgroundBrush ) ; + + virtual void DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle, const wxGraphicsBrush& backgroundBrush ); + virtual void GetTextExtent( const wxString &text, wxDouble *width, wxDouble *height, wxDouble *descent, wxDouble *externalLeading ) const = 0; @@ -598,13 +610,18 @@ public : // Context virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc) = 0 ; - +#ifdef __WXMSW__ + virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0 ; +#endif virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0; virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ) = 0; virtual wxGraphicsContext * CreateContext( wxWindow* window ) = 0; + // create a context that can be used for measuring texts only, no drawing allowed + virtual wxGraphicsContext * CreateMeasuringContext() = 0; + // Path virtual wxGraphicsPath CreatePath() = 0;