From 1cc7d13a08ae3ebf253c1543f45a3bfdd64ffe80 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 5 Mar 2008 21:11:44 +0000 Subject: [PATCH] graphics context additions and merging graphics bitmap additions from Kevin O. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dcgraph.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 2dc10c9a3d..14584924ba 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -952,8 +952,13 @@ void wxGCDCImpl::Clear(void) void wxGCDCImpl::DoGetSize(int *width, int *height) const { - *width = 10000; - *height = 10000; + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoGetSize - invalid DC") ); + wxDouble w,h; + m_graphicContext->GetSize( &w, &h ); + if ( height ) + *height = (int) (h+0.5); + if ( width ) + *width = (int) (w+0.5); } void wxGCDCImpl::DoGradientFillLinear(const wxRect& rect, -- 2.49.0