From 6c2019b9426b21bd0eb3099afb2cb8cb901ce8b9 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 13 Aug 2002 20:56:40 +0000 Subject: [PATCH] Minor correction to GetTextExtent. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 4 ++-- src/gtk1/dcclient.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.47.2