Store the DC used to initialize wxGCDC, and make it retrievable. This helps with things like wxRenderer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,6 +94,8 @@ public:
|
|||||||
wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
|
wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
|
||||||
virtual void SetGraphicsContext( wxGraphicsContext* ctx );
|
virtual void SetGraphicsContext( wxGraphicsContext* ctx );
|
||||||
|
|
||||||
|
wxDC* GetBaseDC() { return m_baseDC; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the true implementations
|
// the true implementations
|
||||||
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||||
@@ -183,6 +185,7 @@ protected:
|
|||||||
double m_formerScaleX, m_formerScaleY;
|
double m_formerScaleX, m_formerScaleY;
|
||||||
|
|
||||||
wxGraphicsContext* m_graphicContext;
|
wxGraphicsContext* m_graphicContext;
|
||||||
|
wxDC* m_baseDC;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -79,6 +79,7 @@ void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx )
|
|||||||
wxGCDC::wxGCDC(const wxWindowDC& dc)
|
wxGCDC::wxGCDC(const wxWindowDC& dc)
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
m_baseDC = (wxDC*)&dc;
|
||||||
SetGraphicsContext( wxGraphicsContext::Create(dc) );
|
SetGraphicsContext( wxGraphicsContext::Create(dc) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,6 +87,7 @@ wxGCDC::wxGCDC(const wxWindowDC& dc)
|
|||||||
wxGCDC::wxGCDC(const wxMemoryDC& dc)
|
wxGCDC::wxGCDC(const wxMemoryDC& dc)
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
m_baseDC = (wxDC*)&dc;
|
||||||
SetGraphicsContext( wxGraphicsContext::Create(dc) );
|
SetGraphicsContext( wxGraphicsContext::Create(dc) );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -102,6 +104,7 @@ void wxGCDC::Init()
|
|||||||
m_brush = *wxWHITE_BRUSH;
|
m_brush = *wxWHITE_BRUSH;
|
||||||
|
|
||||||
m_graphicContext = NULL;
|
m_graphicContext = NULL;
|
||||||
|
m_baseDC = NULL;
|
||||||
m_logicalFunctionSupported = true;
|
m_logicalFunctionSupported = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user