unified Pango GetTextExtent implementations

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-07-13 11:33:01 +00:00
parent a43ed08aa8
commit fd43b1b3ea
3 changed files with 9 additions and 10 deletions

View File

@@ -3575,10 +3575,9 @@ void wxWindowGTK::GetTextExtent( const wxString& string,
pango_layout_set_text(layout, (const char*) data, strlen( (const char*) data ));
#endif
}
PangoLayoutLine *line = pango_layout_get_line(layout, 0);
PangoRectangle rect;
pango_layout_line_get_extents(line, NULL, &rect);
pango_layout_get_extents(layout, NULL, &rect);
if (x) (*x) = (wxCoord) PANGO_PIXELS(rect.width);
if (y) (*y) = (wxCoord) PANGO_PIXELS(rect.height);