From 8bd3541321152b1f2997124d77246d43bf4de3fb Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 7 Nov 2006 19:59:21 +0000 Subject: [PATCH] fixes for the dummy classes (used when wxUSE_GRAPHICS_CONTEXT is 0) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_graphics.i | 101 ++++++++++++++++++++------------- wxPython/src/gtk/_gdi_wrap.cpp | 101 ++++++++++++++++++++------------- wxPython/src/mac/_gdi_wrap.cpp | 101 ++++++++++++++++++++------------- wxPython/src/msw/_gdi_wrap.cpp | 101 ++++++++++++++++++++------------- 4 files changed, 244 insertions(+), 160 deletions(-) diff --git a/wxPython/src/_graphics.i b/wxPython/src/_graphics.i index 07f7db2e23..b2fd3aa94e 100644 --- a/wxPython/src/_graphics.i +++ b/wxPython/src/_graphics.i @@ -33,10 +33,14 @@ // C++ stub classes for platforms or build configurations that don't have // wxGraphicsContext yet. +class wxGraphicsRenderer; +class wxGraphicsMatrix; + class wxGraphicsObject : public wxObject { public : + wxGraphicsObject() {} wxGraphicsObject( wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsObject is not available on this platform."); @@ -51,6 +55,7 @@ public : class wxGraphicsPen : public wxGraphicsObject { +public: wxGraphicsPen() {} virtual ~wxGraphicsPen() {} } ; @@ -81,6 +86,7 @@ wxGraphicsFont wxNullGraphicsFont; class wxGraphicsPath : public wxGraphicsObject { public : + wxGraphicsPath() { } wxGraphicsPath(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsPath is not available on this platform."); @@ -93,10 +99,10 @@ public : void AddLineToPoint( const wxPoint2DDouble& ) {} void AddCurveToPoint( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, wxDouble ) {} void AddCurveToPoint( const wxPoint2DDouble&, const wxPoint2DDouble&, const wxPoint2DDouble&) {} - void AddPath( const wxGraphicsPath* ) {} + void AddPath( const wxGraphicsPath& ) {} void CloseSubpath() {} - void GetCurrentPoint( wxDouble&, wxDouble&) {} - wxPoint2DDouble GetCurrentPoint() { reutrn wxPoint2D(0,0); } + void GetCurrentPoint( wxDouble&, wxDouble&) const {} + wxPoint2DDouble GetCurrentPoint() const { return wxPoint2D(0,0); } void AddArc( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, bool ) {} void AddArc( const wxPoint2DDouble& , wxDouble, wxDouble , wxDouble , bool ) {} @@ -108,13 +114,13 @@ public : void AddEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} void AddRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} void * GetNativePath() const { return NULL; } - void UnGetNativePath(void *) {} - void Transform( wxGraphicsMatrix* ) {} - void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) {} - wxRect2D GetBox() { return wxRect2D(0,0,0,0); } + void UnGetNativePath(void *) const {} + void Transform( const wxGraphicsMatrix& ) {} + void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) const {} + wxRect2D GetBox() const { return wxRect2D(0,0,0,0); } - bool Contains( wxDouble , wxDouble , int ) { return false; } - bool Contains( const wxPoint2DDouble& , int ) { return false; } + bool Contains( wxDouble , wxDouble , int ) const { return false; } + bool Contains( const wxPoint2DDouble& , int ) const { return false; } }; wxGraphicsPath wxNullGraphicsPath; @@ -122,23 +128,24 @@ wxGraphicsPath wxNullGraphicsPath; class wxGraphicsMatrix : public wxGraphicsObject { public : + wxGraphicsMatrix() { } wxGraphicsMatrix(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsMatrix is not available on this platform."); } virtual ~wxGraphicsMatrix() {} - virtual void Concat( const wxGraphicsMatrix * ) {} - virtual void Copy( const wxGraphicsMatrix * ) {} + virtual void Concat( const wxGraphicsMatrix & ) {} + virtual void Copy( const wxGraphicsMatrix & ) {} virtual void Set(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void Invert() {} - virtual bool IsEqual( const wxGraphicsMatrix* t) const {} - virtual bool IsIdentity() { return false; } + virtual bool IsEqual( const wxGraphicsMatrix& t) const { return false; } + virtual bool IsIdentity() const { return false; } virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void TransformPoint( wxDouble *, wxDouble * ) {} - virtual void TransformDistance( wxDouble *, wxDouble * ) {} + virtual void TransformPoint( wxDouble *, wxDouble * ) const {} + virtual void TransformDistance( wxDouble *, wxDouble * ) const {} virtual void * GetNativeMatrix() const { return NULL; } }; wxGraphicsMatrix wxNullGraphicsMatrix; @@ -155,43 +162,52 @@ public: virtual ~wxGraphicsContext() {} + static wxGraphicsContext* Create() { + PyErr_SetString(PyExc_NotImplementedError, + "wx.GraphicsContext is not available on this platform."); + return NULL; + } static wxGraphicsContext* Create( const wxWindowDC& ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNative( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNativeWindow( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* Create( wxWindow* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } - wxGraphicsPath * CreatePath() { return NULL; } + wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return NULL; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return NULL; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateLinearGradientBrush( wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return NULL; } + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius, - const wxColour &oColor, const wxColour &cColor) { return NULL; } + const wxColour &oColor, const wxColour &cColor) { return wxNullGraphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return NULL; } + virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return wxNullGraphicsFont; } - virtual wxGraphicsMatrix* CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, - wxDouble, wxDouble) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, + wxDouble, wxDouble) { return wxNullGraphicsMatrix; } virtual void PushState() {} virtual void PopState() {} @@ -202,9 +218,9 @@ public: virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void ConcatTransform( const wxGraphicsMatrix* ) {} - virtual void SetTransform( const wxGraphicsMatrix* ) {} - virtual void GetTransform( wxGraphicsMatrix* ) {} + virtual void ConcatTransform( const wxGraphicsMatrix& ) {} + virtual void SetTransform( const wxGraphicsMatrix& ) {} + virtual wxGraphicsMatrix GetTransform() const { return wxNullGraphicsMatrix; } virtual void SetPen( const wxGraphicsPen& ) {} void SetPen( const wxPen& ) {} @@ -215,12 +231,14 @@ public: virtual void SetFont( const wxGraphicsFont& ) {} void SetFont( const wxFont&, const wxColour& ) {} - virtual void StrokePath( const wxGraphicsPath * ) {} - virtual void FillPath( const wxGraphicsPath *, int ) {} - virtual void DrawPath( const wxGraphicsPath *, int ) {} + virtual void StrokePath( const wxGraphicsPath & ) {} + virtual void FillPath( const wxGraphicsPath &, int ) {} + virtual void DrawPath( const wxGraphicsPath &, int ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxGraphicsBrush ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble , wxGraphicsBrush ) {} virtual void GetTextExtent( const wxString &, wxDouble *, wxDouble *, wxDouble *, wxDouble * ) const {} virtual void GetPartialTextExtents(const wxString& , wxArrayDouble& ) const {} @@ -233,6 +251,7 @@ public: virtual void StrokeLines( size_t , const wxPoint2DDouble *, const wxPoint2DDouble *) {} virtual void DrawLines( size_t , const wxPoint2DDouble *, int ) {} virtual void DrawRectangle( wxDouble , wxDouble , wxDouble , wxDouble ) {} + virtual void DrawRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawRoundedRectangle( wxDouble wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual bool ShouldOffset() const { return false; } @@ -249,28 +268,30 @@ public : virtual ~wxGraphicsRenderer() {} - static wxGraphicsRenderer* GetDefaultRenderer( + static wxGraphicsRenderer* GetDefaultRenderer() { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsRenderer is not available on this platform."); - ); + return NULL; + } virtual wxGraphicsContext * CreateContext( const wxWindowDC& ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeContext( void * ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeWindow( void * ) { return NULL; } virtual wxGraphicsContext * CreateContext( wxWindow* ) { return NULL; } + virtual wxGraphicsContext * CreateMeasuringContext() { return NULL; } - virtual wxGraphicsPath * CreatePath() { return NULL; } + virtual wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsMatrix * CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , - wxDouble , wxDouble ) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , + wxDouble , wxDouble ) { return wxNullGraphicsMatrix; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGaphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGaphicsBrush; } - virtual wxGraphicsBrush CreateLinearGradientBrush(xDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return wxNullGaphicsBrush; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } + virtual wxGraphicsBrush CreateLinearGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour &, const wxColour &) { return wxNullGaphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGaphicsFont; } + const wxColour &, const wxColour &) { return wxNullGraphicsBrush; } + virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGraphicsFont; } }; diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index a3b78807c5..e082109e85 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -3634,10 +3634,14 @@ public: // C++ stub classes for platforms or build configurations that don't have // wxGraphicsContext yet. +class wxGraphicsRenderer; +class wxGraphicsMatrix; + class wxGraphicsObject : public wxObject { public : + wxGraphicsObject() {} wxGraphicsObject( wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsObject is not available on this platform."); @@ -3652,6 +3656,7 @@ public : class wxGraphicsPen : public wxGraphicsObject { +public: wxGraphicsPen() {} virtual ~wxGraphicsPen() {} } ; @@ -3682,6 +3687,7 @@ wxGraphicsFont wxNullGraphicsFont; class wxGraphicsPath : public wxGraphicsObject { public : + wxGraphicsPath() { } wxGraphicsPath(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsPath is not available on this platform."); @@ -3694,10 +3700,10 @@ public : void AddLineToPoint( const wxPoint2DDouble& ) {} void AddCurveToPoint( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, wxDouble ) {} void AddCurveToPoint( const wxPoint2DDouble&, const wxPoint2DDouble&, const wxPoint2DDouble&) {} - void AddPath( const wxGraphicsPath* ) {} + void AddPath( const wxGraphicsPath& ) {} void CloseSubpath() {} - void GetCurrentPoint( wxDouble&, wxDouble&) {} - wxPoint2DDouble GetCurrentPoint() { reutrn wxPoint2D(0,0); } + void GetCurrentPoint( wxDouble&, wxDouble&) const {} + wxPoint2DDouble GetCurrentPoint() const { return wxPoint2D(0,0); } void AddArc( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, bool ) {} void AddArc( const wxPoint2DDouble& , wxDouble, wxDouble , wxDouble , bool ) {} @@ -3709,13 +3715,13 @@ public : void AddEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} void AddRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} void * GetNativePath() const { return NULL; } - void UnGetNativePath(void *) {} - void Transform( wxGraphicsMatrix* ) {} - void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) {} - wxRect2D GetBox() { return wxRect2D(0,0,0,0); } + void UnGetNativePath(void *) const {} + void Transform( const wxGraphicsMatrix& ) {} + void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) const {} + wxRect2D GetBox() const { return wxRect2D(0,0,0,0); } - bool Contains( wxDouble , wxDouble , int ) { return false; } - bool Contains( const wxPoint2DDouble& , int ) { return false; } + bool Contains( wxDouble , wxDouble , int ) const { return false; } + bool Contains( const wxPoint2DDouble& , int ) const { return false; } }; wxGraphicsPath wxNullGraphicsPath; @@ -3723,23 +3729,24 @@ wxGraphicsPath wxNullGraphicsPath; class wxGraphicsMatrix : public wxGraphicsObject { public : + wxGraphicsMatrix() { } wxGraphicsMatrix(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsMatrix is not available on this platform."); } virtual ~wxGraphicsMatrix() {} - virtual void Concat( const wxGraphicsMatrix * ) {} - virtual void Copy( const wxGraphicsMatrix * ) {} + virtual void Concat( const wxGraphicsMatrix & ) {} + virtual void Copy( const wxGraphicsMatrix & ) {} virtual void Set(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void Invert() {} - virtual bool IsEqual( const wxGraphicsMatrix* t) const {} - virtual bool IsIdentity() { return false; } + virtual bool IsEqual( const wxGraphicsMatrix& t) const { return false; } + virtual bool IsIdentity() const { return false; } virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void TransformPoint( wxDouble *, wxDouble * ) {} - virtual void TransformDistance( wxDouble *, wxDouble * ) {} + virtual void TransformPoint( wxDouble *, wxDouble * ) const {} + virtual void TransformDistance( wxDouble *, wxDouble * ) const {} virtual void * GetNativeMatrix() const { return NULL; } }; wxGraphicsMatrix wxNullGraphicsMatrix; @@ -3756,43 +3763,52 @@ public: virtual ~wxGraphicsContext() {} + static wxGraphicsContext* Create() { + PyErr_SetString(PyExc_NotImplementedError, + "wx.GraphicsContext is not available on this platform."); + return NULL; + } static wxGraphicsContext* Create( const wxWindowDC& ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNative( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNativeWindow( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* Create( wxWindow* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } - wxGraphicsPath * CreatePath() { return NULL; } + wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return NULL; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return NULL; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateLinearGradientBrush( wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return NULL; } + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius, - const wxColour &oColor, const wxColour &cColor) { return NULL; } + const wxColour &oColor, const wxColour &cColor) { return wxNullGraphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return NULL; } + virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return wxNullGraphicsFont; } - virtual wxGraphicsMatrix* CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, - wxDouble, wxDouble) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, + wxDouble, wxDouble) { return wxNullGraphicsMatrix; } virtual void PushState() {} virtual void PopState() {} @@ -3803,9 +3819,9 @@ public: virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void ConcatTransform( const wxGraphicsMatrix* ) {} - virtual void SetTransform( const wxGraphicsMatrix* ) {} - virtual void GetTransform( wxGraphicsMatrix* ) {} + virtual void ConcatTransform( const wxGraphicsMatrix& ) {} + virtual void SetTransform( const wxGraphicsMatrix& ) {} + virtual wxGraphicsMatrix GetTransform() const { return wxNullGraphicsMatrix; } virtual void SetPen( const wxGraphicsPen& ) {} void SetPen( const wxPen& ) {} @@ -3816,12 +3832,14 @@ public: virtual void SetFont( const wxGraphicsFont& ) {} void SetFont( const wxFont&, const wxColour& ) {} - virtual void StrokePath( const wxGraphicsPath * ) {} - virtual void FillPath( const wxGraphicsPath *, int ) {} - virtual void DrawPath( const wxGraphicsPath *, int ) {} + virtual void StrokePath( const wxGraphicsPath & ) {} + virtual void FillPath( const wxGraphicsPath &, int ) {} + virtual void DrawPath( const wxGraphicsPath &, int ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxGraphicsBrush ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble , wxGraphicsBrush ) {} virtual void GetTextExtent( const wxString &, wxDouble *, wxDouble *, wxDouble *, wxDouble * ) const {} virtual void GetPartialTextExtents(const wxString& , wxArrayDouble& ) const {} @@ -3834,6 +3852,7 @@ public: virtual void StrokeLines( size_t , const wxPoint2DDouble *, const wxPoint2DDouble *) {} virtual void DrawLines( size_t , const wxPoint2DDouble *, int ) {} virtual void DrawRectangle( wxDouble , wxDouble , wxDouble , wxDouble ) {} + virtual void DrawRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawRoundedRectangle( wxDouble wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual bool ShouldOffset() const { return false; } @@ -3850,28 +3869,30 @@ public : virtual ~wxGraphicsRenderer() {} - static wxGraphicsRenderer* GetDefaultRenderer( + static wxGraphicsRenderer* GetDefaultRenderer() { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsRenderer is not available on this platform."); - ); + return NULL; + } virtual wxGraphicsContext * CreateContext( const wxWindowDC& ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeContext( void * ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeWindow( void * ) { return NULL; } virtual wxGraphicsContext * CreateContext( wxWindow* ) { return NULL; } + virtual wxGraphicsContext * CreateMeasuringContext() { return NULL; } - virtual wxGraphicsPath * CreatePath() { return NULL; } + virtual wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsMatrix * CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , - wxDouble , wxDouble ) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , + wxDouble , wxDouble ) { return wxNullGraphicsMatrix; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGaphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGaphicsBrush; } - virtual wxGraphicsBrush CreateLinearGradientBrush(xDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return wxNullGaphicsBrush; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } + virtual wxGraphicsBrush CreateLinearGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour &, const wxColour &) { return wxNullGaphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGaphicsFont; } + const wxColour &, const wxColour &) { return wxNullGraphicsBrush; } + virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGraphicsFont; } }; diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 8a00e5616f..61ee0f5e74 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -3638,10 +3638,14 @@ static void wxDC_GetBoundingBox(wxDC* dc, int* x1, int* y1, int* x2, int* y2) { // C++ stub classes for platforms or build configurations that don't have // wxGraphicsContext yet. +class wxGraphicsRenderer; +class wxGraphicsMatrix; + class wxGraphicsObject : public wxObject { public : + wxGraphicsObject() {} wxGraphicsObject( wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsObject is not available on this platform."); @@ -3656,6 +3660,7 @@ public : class wxGraphicsPen : public wxGraphicsObject { +public: wxGraphicsPen() {} virtual ~wxGraphicsPen() {} } ; @@ -3686,6 +3691,7 @@ wxGraphicsFont wxNullGraphicsFont; class wxGraphicsPath : public wxGraphicsObject { public : + wxGraphicsPath() { } wxGraphicsPath(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsPath is not available on this platform."); @@ -3698,10 +3704,10 @@ public : void AddLineToPoint( const wxPoint2DDouble& ) {} void AddCurveToPoint( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, wxDouble ) {} void AddCurveToPoint( const wxPoint2DDouble&, const wxPoint2DDouble&, const wxPoint2DDouble&) {} - void AddPath( const wxGraphicsPath* ) {} + void AddPath( const wxGraphicsPath& ) {} void CloseSubpath() {} - void GetCurrentPoint( wxDouble&, wxDouble&) {} - wxPoint2DDouble GetCurrentPoint() { reutrn wxPoint2D(0,0); } + void GetCurrentPoint( wxDouble&, wxDouble&) const {} + wxPoint2DDouble GetCurrentPoint() const { return wxPoint2D(0,0); } void AddArc( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, bool ) {} void AddArc( const wxPoint2DDouble& , wxDouble, wxDouble , wxDouble , bool ) {} @@ -3713,13 +3719,13 @@ public : void AddEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} void AddRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} void * GetNativePath() const { return NULL; } - void UnGetNativePath(void *) {} - void Transform( wxGraphicsMatrix* ) {} - void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) {} - wxRect2D GetBox() { return wxRect2D(0,0,0,0); } + void UnGetNativePath(void *) const {} + void Transform( const wxGraphicsMatrix& ) {} + void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) const {} + wxRect2D GetBox() const { return wxRect2D(0,0,0,0); } - bool Contains( wxDouble , wxDouble , int ) { return false; } - bool Contains( const wxPoint2DDouble& , int ) { return false; } + bool Contains( wxDouble , wxDouble , int ) const { return false; } + bool Contains( const wxPoint2DDouble& , int ) const { return false; } }; wxGraphicsPath wxNullGraphicsPath; @@ -3727,23 +3733,24 @@ wxGraphicsPath wxNullGraphicsPath; class wxGraphicsMatrix : public wxGraphicsObject { public : + wxGraphicsMatrix() { } wxGraphicsMatrix(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsMatrix is not available on this platform."); } virtual ~wxGraphicsMatrix() {} - virtual void Concat( const wxGraphicsMatrix * ) {} - virtual void Copy( const wxGraphicsMatrix * ) {} + virtual void Concat( const wxGraphicsMatrix & ) {} + virtual void Copy( const wxGraphicsMatrix & ) {} virtual void Set(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void Invert() {} - virtual bool IsEqual( const wxGraphicsMatrix* t) const {} - virtual bool IsIdentity() { return false; } + virtual bool IsEqual( const wxGraphicsMatrix& t) const { return false; } + virtual bool IsIdentity() const { return false; } virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void TransformPoint( wxDouble *, wxDouble * ) {} - virtual void TransformDistance( wxDouble *, wxDouble * ) {} + virtual void TransformPoint( wxDouble *, wxDouble * ) const {} + virtual void TransformDistance( wxDouble *, wxDouble * ) const {} virtual void * GetNativeMatrix() const { return NULL; } }; wxGraphicsMatrix wxNullGraphicsMatrix; @@ -3760,43 +3767,52 @@ public: virtual ~wxGraphicsContext() {} + static wxGraphicsContext* Create() { + PyErr_SetString(PyExc_NotImplementedError, + "wx.GraphicsContext is not available on this platform."); + return NULL; + } static wxGraphicsContext* Create( const wxWindowDC& ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNative( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNativeWindow( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* Create( wxWindow* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } - wxGraphicsPath * CreatePath() { return NULL; } + wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return NULL; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return NULL; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateLinearGradientBrush( wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return NULL; } + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius, - const wxColour &oColor, const wxColour &cColor) { return NULL; } + const wxColour &oColor, const wxColour &cColor) { return wxNullGraphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return NULL; } + virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return wxNullGraphicsFont; } - virtual wxGraphicsMatrix* CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, - wxDouble, wxDouble) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, + wxDouble, wxDouble) { return wxNullGraphicsMatrix; } virtual void PushState() {} virtual void PopState() {} @@ -3807,9 +3823,9 @@ public: virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void ConcatTransform( const wxGraphicsMatrix* ) {} - virtual void SetTransform( const wxGraphicsMatrix* ) {} - virtual void GetTransform( wxGraphicsMatrix* ) {} + virtual void ConcatTransform( const wxGraphicsMatrix& ) {} + virtual void SetTransform( const wxGraphicsMatrix& ) {} + virtual wxGraphicsMatrix GetTransform() const { return wxNullGraphicsMatrix; } virtual void SetPen( const wxGraphicsPen& ) {} void SetPen( const wxPen& ) {} @@ -3820,12 +3836,14 @@ public: virtual void SetFont( const wxGraphicsFont& ) {} void SetFont( const wxFont&, const wxColour& ) {} - virtual void StrokePath( const wxGraphicsPath * ) {} - virtual void FillPath( const wxGraphicsPath *, int ) {} - virtual void DrawPath( const wxGraphicsPath *, int ) {} + virtual void StrokePath( const wxGraphicsPath & ) {} + virtual void FillPath( const wxGraphicsPath &, int ) {} + virtual void DrawPath( const wxGraphicsPath &, int ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxGraphicsBrush ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble , wxGraphicsBrush ) {} virtual void GetTextExtent( const wxString &, wxDouble *, wxDouble *, wxDouble *, wxDouble * ) const {} virtual void GetPartialTextExtents(const wxString& , wxArrayDouble& ) const {} @@ -3838,6 +3856,7 @@ public: virtual void StrokeLines( size_t , const wxPoint2DDouble *, const wxPoint2DDouble *) {} virtual void DrawLines( size_t , const wxPoint2DDouble *, int ) {} virtual void DrawRectangle( wxDouble , wxDouble , wxDouble , wxDouble ) {} + virtual void DrawRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawRoundedRectangle( wxDouble wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual bool ShouldOffset() const { return false; } @@ -3854,28 +3873,30 @@ public : virtual ~wxGraphicsRenderer() {} - static wxGraphicsRenderer* GetDefaultRenderer( + static wxGraphicsRenderer* GetDefaultRenderer() { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsRenderer is not available on this platform."); - ); + return NULL; + } virtual wxGraphicsContext * CreateContext( const wxWindowDC& ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeContext( void * ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeWindow( void * ) { return NULL; } virtual wxGraphicsContext * CreateContext( wxWindow* ) { return NULL; } + virtual wxGraphicsContext * CreateMeasuringContext() { return NULL; } - virtual wxGraphicsPath * CreatePath() { return NULL; } + virtual wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsMatrix * CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , - wxDouble , wxDouble ) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , + wxDouble , wxDouble ) { return wxNullGraphicsMatrix; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGaphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGaphicsBrush; } - virtual wxGraphicsBrush CreateLinearGradientBrush(xDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return wxNullGaphicsBrush; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } + virtual wxGraphicsBrush CreateLinearGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour &, const wxColour &) { return wxNullGaphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGaphicsFont; } + const wxColour &, const wxColour &) { return wxNullGraphicsBrush; } + virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGraphicsFont; } }; diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index 36361c4db3..717bad2de6 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -3616,10 +3616,14 @@ static void wxDC_GetBoundingBox(wxDC* dc, int* x1, int* y1, int* x2, int* y2) { // C++ stub classes for platforms or build configurations that don't have // wxGraphicsContext yet. +class wxGraphicsRenderer; +class wxGraphicsMatrix; + class wxGraphicsObject : public wxObject { public : + wxGraphicsObject() {} wxGraphicsObject( wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsObject is not available on this platform."); @@ -3634,6 +3638,7 @@ public : class wxGraphicsPen : public wxGraphicsObject { +public: wxGraphicsPen() {} virtual ~wxGraphicsPen() {} } ; @@ -3664,6 +3669,7 @@ wxGraphicsFont wxNullGraphicsFont; class wxGraphicsPath : public wxGraphicsObject { public : + wxGraphicsPath() { } wxGraphicsPath(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsPath is not available on this platform."); @@ -3676,10 +3682,10 @@ public : void AddLineToPoint( const wxPoint2DDouble& ) {} void AddCurveToPoint( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, wxDouble ) {} void AddCurveToPoint( const wxPoint2DDouble&, const wxPoint2DDouble&, const wxPoint2DDouble&) {} - void AddPath( const wxGraphicsPath* ) {} + void AddPath( const wxGraphicsPath& ) {} void CloseSubpath() {} - void GetCurrentPoint( wxDouble&, wxDouble&) {} - wxPoint2DDouble GetCurrentPoint() { reutrn wxPoint2D(0,0); } + void GetCurrentPoint( wxDouble&, wxDouble&) const {} + wxPoint2DDouble GetCurrentPoint() const { return wxPoint2D(0,0); } void AddArc( wxDouble, wxDouble, wxDouble, wxDouble, wxDouble, bool ) {} void AddArc( const wxPoint2DDouble& , wxDouble, wxDouble , wxDouble , bool ) {} @@ -3691,13 +3697,13 @@ public : void AddEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} void AddRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} void * GetNativePath() const { return NULL; } - void UnGetNativePath(void *) {} - void Transform( wxGraphicsMatrix* ) {} - void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) {} - wxRect2D GetBox() { return wxRect2D(0,0,0,0); } + void UnGetNativePath(void *) const {} + void Transform( const wxGraphicsMatrix& ) {} + void GetBox(wxDouble *, wxDouble *, wxDouble *, wxDouble *) const {} + wxRect2D GetBox() const { return wxRect2D(0,0,0,0); } - bool Contains( wxDouble , wxDouble , int ) { return false; } - bool Contains( const wxPoint2DDouble& , int ) { return false; } + bool Contains( wxDouble , wxDouble , int ) const { return false; } + bool Contains( const wxPoint2DDouble& , int ) const { return false; } }; wxGraphicsPath wxNullGraphicsPath; @@ -3705,23 +3711,24 @@ wxGraphicsPath wxNullGraphicsPath; class wxGraphicsMatrix : public wxGraphicsObject { public : + wxGraphicsMatrix() { } wxGraphicsMatrix(wxGraphicsRenderer* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsMatrix is not available on this platform."); } virtual ~wxGraphicsMatrix() {} - virtual void Concat( const wxGraphicsMatrix * ) {} - virtual void Copy( const wxGraphicsMatrix * ) {} + virtual void Concat( const wxGraphicsMatrix & ) {} + virtual void Copy( const wxGraphicsMatrix & ) {} virtual void Set(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void Invert() {} - virtual bool IsEqual( const wxGraphicsMatrix* t) const {} - virtual bool IsIdentity() { return false; } + virtual bool IsEqual( const wxGraphicsMatrix& t) const { return false; } + virtual bool IsIdentity() const { return false; } virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void TransformPoint( wxDouble *, wxDouble * ) {} - virtual void TransformDistance( wxDouble *, wxDouble * ) {} + virtual void TransformPoint( wxDouble *, wxDouble * ) const {} + virtual void TransformDistance( wxDouble *, wxDouble * ) const {} virtual void * GetNativeMatrix() const { return NULL; } }; wxGraphicsMatrix wxNullGraphicsMatrix; @@ -3738,43 +3745,52 @@ public: virtual ~wxGraphicsContext() {} + static wxGraphicsContext* Create() { + PyErr_SetString(PyExc_NotImplementedError, + "wx.GraphicsContext is not available on this platform."); + return NULL; + } static wxGraphicsContext* Create( const wxWindowDC& ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNative( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* CreateFromNativeWindow( void * ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } static wxGraphicsContext* Create( wxWindow* ) { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsContext is not available on this platform."); + return NULL; } - wxGraphicsPath * CreatePath() { return NULL; } + wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return NULL; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return NULL; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateLinearGradientBrush( wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return NULL; } + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius, - const wxColour &oColor, const wxColour &cColor) { return NULL; } + const wxColour &oColor, const wxColour &cColor) { return wxNullGraphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return NULL; } + virtual wxGraphicsFont CreateFont( const wxFont &, const wxColour & ) { return wxNullGraphicsFont; } - virtual wxGraphicsMatrix* CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, - wxDouble, wxDouble) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble, wxDouble, wxDouble, wxDouble, + wxDouble, wxDouble) { return wxNullGraphicsMatrix; } virtual void PushState() {} virtual void PopState() {} @@ -3785,9 +3801,9 @@ public: virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} - virtual void ConcatTransform( const wxGraphicsMatrix* ) {} - virtual void SetTransform( const wxGraphicsMatrix* ) {} - virtual void GetTransform( wxGraphicsMatrix* ) {} + virtual void ConcatTransform( const wxGraphicsMatrix& ) {} + virtual void SetTransform( const wxGraphicsMatrix& ) {} + virtual wxGraphicsMatrix GetTransform() const { return wxNullGraphicsMatrix; } virtual void SetPen( const wxGraphicsPen& ) {} void SetPen( const wxPen& ) {} @@ -3798,12 +3814,14 @@ public: virtual void SetFont( const wxGraphicsFont& ) {} void SetFont( const wxFont&, const wxColour& ) {} - virtual void StrokePath( const wxGraphicsPath * ) {} - virtual void FillPath( const wxGraphicsPath *, int ) {} - virtual void DrawPath( const wxGraphicsPath *, int ) {} + virtual void StrokePath( const wxGraphicsPath & ) {} + virtual void FillPath( const wxGraphicsPath &, int ) {} + virtual void DrawPath( const wxGraphicsPath &, int ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble ) {} virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxGraphicsBrush ) {} + virtual void DrawText( const wxString &, wxDouble , wxDouble , wxDouble , wxGraphicsBrush ) {} virtual void GetTextExtent( const wxString &, wxDouble *, wxDouble *, wxDouble *, wxDouble * ) const {} virtual void GetPartialTextExtents(const wxString& , wxArrayDouble& ) const {} @@ -3816,6 +3834,7 @@ public: virtual void StrokeLines( size_t , const wxPoint2DDouble *, const wxPoint2DDouble *) {} virtual void DrawLines( size_t , const wxPoint2DDouble *, int ) {} virtual void DrawRectangle( wxDouble , wxDouble , wxDouble , wxDouble ) {} + virtual void DrawRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawRoundedRectangle( wxDouble wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual bool ShouldOffset() const { return false; } @@ -3832,28 +3851,30 @@ public : virtual ~wxGraphicsRenderer() {} - static wxGraphicsRenderer* GetDefaultRenderer( + static wxGraphicsRenderer* GetDefaultRenderer() { PyErr_SetString(PyExc_NotImplementedError, "wx.GraphicsRenderer is not available on this platform."); - ); + return NULL; + } virtual wxGraphicsContext * CreateContext( const wxWindowDC& ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeContext( void * ) { return NULL; } virtual wxGraphicsContext * CreateContextFromNativeWindow( void * ) { return NULL; } virtual wxGraphicsContext * CreateContext( wxWindow* ) { return NULL; } + virtual wxGraphicsContext * CreateMeasuringContext() { return NULL; } - virtual wxGraphicsPath * CreatePath() { return NULL; } + virtual wxGraphicsPath CreatePath() { return wxNullGraphicsPath; } - virtual wxGraphicsMatrix * CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , - wxDouble , wxDouble ) { return NULL; } + virtual wxGraphicsMatrix CreateMatrix( wxDouble , wxDouble , wxDouble , wxDouble , + wxDouble , wxDouble ) { return wxNullGraphicsMatrix; } - virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGaphicsPen; } - virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGaphicsBrush; } - virtual wxGraphicsBrush CreateLinearGradientBrush(xDouble , wxDouble , wxDouble , wxDouble , - const wxColour&, const wxColour&) { return wxNullGaphicsBrush; } + virtual wxGraphicsPen CreatePen(const wxPen& ) { return wxNullGraphicsPen; } + virtual wxGraphicsBrush CreateBrush(const wxBrush& ) { return wxNullGraphicsBrush; } + virtual wxGraphicsBrush CreateLinearGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , + const wxColour&, const wxColour&) { return wxNullGraphicsBrush; } virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , - const wxColour &, const wxColour &) { return wxNullGaphicsBrush; } - virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGaphicsFont; } + const wxColour &, const wxColour &) { return wxNullGraphicsBrush; } + virtual wxGraphicsFont CreateFont( const wxFont & , const wxColour & ) { return wxNullGraphicsFont; } }; -- 2.45.2