]> git.saurik.com Git - wxWidgets.git/commitdiff
supporting GetSize, fixes #9969
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 24 Sep 2008 09:18:38 +0000 (09:18 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 24 Sep 2008 09:18:38 +0000 (09:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/graphics.cpp

index 7ffc36e55c08a0b4f1f2eef0ddf533066e6e9ea1..a25d643ccd41648878ecb1524672e169bc72c4ce 100644 (file)
@@ -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
 //-----------------------------------------------------------------------------