Implement wxGraphicsContext::GetSize() for Cairo.

As the implementation of this method is basically the same for all ports move
it to the base class itself instead of requiring the derived classes to
implement it. Now the derived classes need to fill in m_width and m_height
members instead.

Do fill them when creating wxGraphicsContext in Cairo version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-03-31 09:38:03 +00:00
parent cdcc1edaf2
commit b129eaa377
6 changed files with 39 additions and 28 deletions

View File

@@ -1390,9 +1390,6 @@ public:
void Init();
// returns the size of the graphics context in device coordinates
virtual void GetSize( wxDouble* width, wxDouble* height);
virtual void StartPage( wxDouble width, wxDouble height );
virtual void EndPage();
@@ -1506,8 +1503,6 @@ private:
#endif
bool m_contextSynthesized;
CGAffineTransform m_windowTransform;
wxDouble m_width;
wxDouble m_height;
bool m_invisible;
#if wxOSX_USE_COCOA_OR_CARBON
@@ -1644,12 +1639,6 @@ wxMacCoreGraphicsContext::~wxMacCoreGraphicsContext()
SetNativeContext(NULL);
}
void wxMacCoreGraphicsContext::GetSize( wxDouble* width, wxDouble* height)
{
*width = m_width;
*height = m_height;
}
void wxMacCoreGraphicsContext::StartPage( wxDouble width, wxDouble height )
{