X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c419e8111d53152c5988216af1e21f31de5f6d2..fc32630a5e03e60a67d4ef53fc59985ea087b451:/include/wx/graphics.h diff --git a/include/wx/graphics.h b/include/wx/graphics.h index 1128c14e02..4ab38f42c7 100644 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -21,6 +21,7 @@ class WXDLLIMPEXP_FWD_CORE wxWindowDC; class WXDLLIMPEXP_FWD_CORE wxMemoryDC; +class WXDLLIMPEXP_FWD_CORE wxPrinterDC; class WXDLLIMPEXP_FWD_CORE wxGraphicsContext; class WXDLLIMPEXP_FWD_CORE wxGraphicsPath; class WXDLLIMPEXP_FWD_CORE wxGraphicsMatrix; @@ -29,6 +30,7 @@ class WXDLLIMPEXP_FWD_CORE wxGraphicsRenderer; class WXDLLIMPEXP_FWD_CORE wxGraphicsPen; class WXDLLIMPEXP_FWD_CORE wxGraphicsBrush; class WXDLLIMPEXP_FWD_CORE wxGraphicsFont; +class WXDLLIMPEXP_FWD_CORE wxGraphicsBitmap; /* * notes about the graphics context apis @@ -79,7 +81,7 @@ private : DECLARE_DYNAMIC_CLASS(wxGraphicsPen) } ; -extern WXDLLEXPORT_DATA(wxGraphicsPen) wxNullGraphicsPen; +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsPen) wxNullGraphicsPen; class WXDLLIMPEXP_CORE wxGraphicsBrush : public wxGraphicsObject { @@ -90,7 +92,7 @@ private : DECLARE_DYNAMIC_CLASS(wxGraphicsBrush) } ; -extern WXDLLEXPORT_DATA(wxGraphicsBrush) wxNullGraphicsBrush; +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsBrush) wxNullGraphicsBrush; class WXDLLIMPEXP_CORE wxGraphicsFont : public wxGraphicsObject { @@ -101,7 +103,18 @@ private : DECLARE_DYNAMIC_CLASS(wxGraphicsFont) } ; -extern WXDLLEXPORT_DATA(wxGraphicsFont) wxNullGraphicsFont; +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsFont) wxNullGraphicsFont; + +class WXDLLIMPEXP_CORE wxGraphicsBitmap : public wxGraphicsObject +{ +public : + wxGraphicsBitmap() {} + virtual ~wxGraphicsBitmap() {} +private : + DECLARE_DYNAMIC_CLASS(wxGraphicsBitmap) +} ; + +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsBitmap) wxNullGraphicsBitmap; class WXDLLIMPEXP_CORE wxGraphicsMatrix : public wxGraphicsObject { @@ -167,7 +180,7 @@ private : DECLARE_DYNAMIC_CLASS(wxGraphicsMatrix) } ; -extern WXDLLEXPORT_DATA(wxGraphicsMatrix) wxNullGraphicsMatrix; +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsMatrix) wxNullGraphicsMatrix; class WXDLLIMPEXP_CORE wxGraphicsPath : public wxGraphicsObject { @@ -253,7 +266,7 @@ private : DECLARE_DYNAMIC_CLASS(wxGraphicsPath) } ; -extern WXDLLEXPORT_DATA(wxGraphicsPath) wxNullGraphicsPath; +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsPath) wxNullGraphicsPath; class WXDLLIMPEXP_CORE wxGraphicsContext : public wxGraphicsObject @@ -265,6 +278,7 @@ public: static wxGraphicsContext* Create( const wxWindowDC& dc) ; static wxGraphicsContext * Create( const wxMemoryDC& dc) ; + static wxGraphicsContext * Create( const wxPrinterDC& dc) ; static wxGraphicsContext* CreateFromNative( void * context ) ; @@ -309,6 +323,12 @@ public: // sets the font virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) const; + // create a native bitmap representation + virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) const; + + // create a native bitmap representation + virtual wxGraphicsBitmap CreateSubBitmap( const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) const; + // create a 'native' matrix corresponding to these values virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0) const; @@ -421,6 +441,10 @@ public: // image support // +#ifndef __WXGTK20__ + virtual void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; +#endif + virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; @@ -521,6 +545,7 @@ public : virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc) = 0 ; virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0 ; + virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc) = 0 ; virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0; @@ -557,7 +582,16 @@ public : // sets the font virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) = 0; + +#ifndef __WXGTK20__ + // create a native bitmap representation + virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) = 0; + // create a subimage from a native image representation + virtual wxGraphicsBitmap CreateSubBitmap( const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; +#endif + + private : DECLARE_NO_COPY_CLASS(wxGraphicsRenderer) DECLARE_ABSTRACT_CLASS(wxGraphicsRenderer)