set descent in GetTextExtend; use PANGO_PIXELS instead of dividing by PANGO_SCALE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1736,8 +1736,10 @@ void wxWindowDC::DoGetTextExtent(const wxString &string,
|
||||
*height = (wxCoord) h;
|
||||
if (descent)
|
||||
{
|
||||
// Do something about metrics here. TODO.
|
||||
*descent = 0;
|
||||
PangoLayoutIter *iter = pango_layout_get_iter(m_layout);
|
||||
int baseline = pango_layout_iter_get_baseline(iter);
|
||||
pango_layout_iter_free(iter);
|
||||
*descent = h - PANGO_PIXELS(baseline);
|
||||
}
|
||||
if (externalLeading)
|
||||
*externalLeading = 0; // ??
|
||||
|
Reference in New Issue
Block a user