diff --git a/include/wx/dcgraph.h b/include/wx/dcgraph.h index df10beeb96..b002a0408a 100644 --- a/include/wx/dcgraph.h +++ b/include/wx/dcgraph.h @@ -32,7 +32,7 @@ public: wxGCDC(); virtual ~wxGCDC(); - wxGraphicsContext* GetGraphicsContext(); + wxGraphicsContext* GetGraphicsContext() const; void SetGraphicsContext( wxGraphicsContext* ctx ); #ifdef __WXMSW__ @@ -103,7 +103,7 @@ public: virtual void ComputeScaleAndOrigin(); - wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; } + wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; } virtual void SetGraphicsContext( wxGraphicsContext* ctx ); // the true implementations diff --git a/interface/wx/dcgraph.h b/interface/wx/dcgraph.h index 345d015acf..acd5b58b2d 100644 --- a/interface/wx/dcgraph.h +++ b/interface/wx/dcgraph.h @@ -38,6 +38,6 @@ public: /** Retrieves associated wxGraphicsContext */ - wxGraphicsContext* GetGraphicsContext(); + wxGraphicsContext* GetGraphicsContext() const; }; diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 8cf95f3f9b..ab615e482f 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -123,7 +123,7 @@ wxGCDC::~wxGCDC() { } -wxGraphicsContext* wxGCDC::GetGraphicsContext() +wxGraphicsContext* wxGCDC::GetGraphicsContext() const { if (!m_pimpl) return NULL; wxGCDCImpl *gc_impl = (wxGCDCImpl*) m_pimpl;