From fbd5416f60ab94bd7f899d9662c2f40aa60da4e8 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 24 Sep 2008 09:18:38 +0000 Subject: [PATCH] supporting GetSize, fixes #9969 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/graphics.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 //----------------------------------------------------------------------------- -- 2.45.2