From: Stefan Csomor Date: Wed, 24 Sep 2008 09:18:38 +0000 (+0000) Subject: supporting GetSize, fixes #9969 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fbd5416f60ab94bd7f899d9662c2f40aa60da4e8 supporting GetSize, fixes #9969 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 7ffc36e55c..a25d643ccd 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -328,6 +328,7 @@ public: wxDouble *descent, wxDouble *externalLeading ) const; virtual void GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const; virtual bool ShouldOffset() const; + virtual void GetSize( wxDouble* width, wxDouble *height ); private: void Init(); @@ -1389,6 +1390,15 @@ wxGraphicsMatrix wxGDIPlusContext::GetTransform() const m_context->GetTransform((Matrix*) matrix.GetNativeMatrix()); return matrix; } + +void wxGDIPlusContext::GetSize( wxDouble* width, wxDouble *height ) +{ + if ( width ) + *width = ::GetDeviceCaps(m_context->GetHDC(), HORZRES); + if ( height ) + *height = ::GetDeviceCaps(m_context->GetHDC(), VERTRES); + +} //----------------------------------------------------------------------------- // wxGDIPlusRenderer declaration //-----------------------------------------------------------------------------