From: Robert Roebling Date: Tue, 13 Aug 2002 20:56:40 +0000 (+0000) Subject: Minor correction to GetTextExtent. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6c2019b9426b21bd0eb3099afb2cb8cb901ce8b9?ds=sidebyside Minor correction to GetTextExtent. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index c673890cba..562143fe57 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1609,8 +1609,8 @@ void wxWindowDC::DoGetTextExtent(const wxString &string, pango_layout_line_get_extents(line, NULL, &rect); - if (width) (*width) = (wxCoord) rect.width; - if (height) (*height) = (wxCoord) rect.height; + if (width) (*width) = (wxCoord) (rect.width / PANGO_SCALE); + if (height) (*height) = (wxCoord) (rect.height / PANGO_SCALE); if (descent) { // Do something about metrics here diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index c673890cba..562143fe57 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1609,8 +1609,8 @@ void wxWindowDC::DoGetTextExtent(const wxString &string, pango_layout_line_get_extents(line, NULL, &rect); - if (width) (*width) = (wxCoord) rect.width; - if (height) (*height) = (wxCoord) rect.height; + if (width) (*width) = (wxCoord) (rect.width / PANGO_SCALE); + if (height) (*height) = (wxCoord) (rect.height / PANGO_SCALE); if (descent) { // Do something about metrics here