+ else
+ m_textForegroundColour = oldPenColour;
+ }
+
+ // We need to add the ascent, not the whole height, since X draws at the
+ // point above the descender.
+#if 0
+ if (use16)
+ XDrawString16((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, XLOG2DEV (x), YLOG2DEV (y) + ascent,
+ (XChar2b *)(char*) (const char*) text, slen);
+ else
+#endif // 0
+#if wxMOTIF_NEW_FONT_HANDLING
+ XFontSet fset = (XFontSet) m_font.GetFontSet (m_userScaleY * m_logicalScaleY, m_display);
+ XmbDrawString((Display*) m_display, (Pixmap) m_pixmap, fset, (GC) m_gc, XLOG2DEV (x), YLOG2DEV (y) + ascent, text, slen);
+#else
+ XDrawString((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, XLOG2DEV (x), YLOG2DEV (y) + ascent, text, slen);
+#endif
+
+ if (m_window && m_window->GetBackingPixmap()) {
+#if 0
+ if (use16)
+ XDrawString16((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y) + ascent,
+ (XChar2b *)(char*) (const char*) text, slen);
+ else
+#endif // 0
+#if wxMOTIF_NEW_FONT_HANDLING
+ XmbDrawString((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), fset, (GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y) + ascent,
+ wxConstCast(text.c_str(), char), slen);
+#else
+ XDrawString((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y) + ascent,
+ wxConstCast(text.c_str(), char), slen);
+#endif
+ }
+
+ // restore fill style
+ XSetFillStyle ((Display*) m_display, (GC) m_gc, gcV.fill_style);
+ if (m_window && m_window->GetBackingPixmap())
+ XSetFillStyle ((Display*) m_display, (GC) m_gcBacking,
+ gcBackingV.fill_style);
+
+ wxCoord w, h;
+ GetTextExtent (text, &w, &h);
+ CalcBoundingBox (x + w, y + h);
+ CalcBoundingBox (x, y);
+}
+
+void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
+ double angle )
+{
+ if (angle == 0.0)
+ {
+ DrawText(text, x, y);
+ return;
+ }
+
+ wxCHECK_RET( Ok(), "invalid dc" );