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:
Kevin Ollivier
2008-04-28 02:29:44 +00:00
parent 00217f95a4
commit ee50eb7432
2 changed files with 6 additions and 0 deletions

View File

@@ -94,6 +94,8 @@ public:
wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
virtual void SetGraphicsContext( wxGraphicsContext* ctx );
wxDC* GetBaseDC() { return m_baseDC; }
protected:
// the true implementations
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
@@ -183,6 +185,7 @@ protected:
double m_formerScaleX, m_formerScaleY;
wxGraphicsContext* m_graphicContext;
wxDC* m_baseDC;
};
#endif

View File

@@ -79,6 +79,7 @@ void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx )
wxGCDC::wxGCDC(const wxWindowDC& dc)
{
Init();
m_baseDC = (wxDC*)&dc;
SetGraphicsContext( wxGraphicsContext::Create(dc) );
}
@@ -86,6 +87,7 @@ wxGCDC::wxGCDC(const wxWindowDC& dc)
wxGCDC::wxGCDC(const wxMemoryDC& dc)
{
Init();
m_baseDC = (wxDC*)&dc;
SetGraphicsContext( wxGraphicsContext::Create(dc) );
}
#endif
@@ -102,6 +104,7 @@ void wxGCDC::Init()
m_brush = *wxWHITE_BRUSH;
m_graphicContext = NULL;
m_baseDC = NULL;
m_logicalFunctionSupported = true;
}