partly successful (i.e. previously it didn't work at all and spewed Pango warnings and now it just doesn't work) attempts to fix drawing text on wxMemoryDC in Unicode build

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-10-31 00:59:06 +00:00
parent 8f514ab459
commit 5c9d9745fe
2 changed files with 7 additions and 13 deletions

View File

@ -32,7 +32,7 @@ class WXDLLIMPEXP_CORE wxClientDC;
class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
{
public:
wxWindowDC();
wxWindowDC() { Init(); }
wxWindowDC( wxWindow *win );
virtual ~wxWindowDC();
@ -118,6 +118,8 @@ protected:
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
void Init();
WXDisplay *m_display;
WXWindow m_window;
WXGC m_penGC;

View File

@ -165,7 +165,7 @@ static void wxFreePoolGC( GC gc )
IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
wxWindowDC::wxWindowDC()
void wxWindowDC::Init()
{
m_display = (WXDisplay *) NULL;
m_penGC = (WXGC *) NULL;
@ -178,7 +178,7 @@ wxWindowDC::wxWindowDC()
m_owner = (wxWindow *)NULL;
#if wxUSE_UNICODE
m_context = (PangoContext *)NULL;
m_context = wxTheApp->GetPangoContext();
m_fontdesc = (PangoFontDescription *)NULL;
#endif
}
@ -187,15 +187,8 @@ wxWindowDC::wxWindowDC( wxWindow *window )
{
wxASSERT_MSG( window, wxT("DC needs a window") );
m_display = (WXDisplay *) NULL;
m_penGC = (WXGC *) NULL;
m_brushGC = (WXGC *) NULL;
m_textGC = (WXGC *) NULL;
m_bgGC = (WXGC *) NULL;
m_cmap = (WXColormap *) NULL;
m_owner = (wxWindow *)NULL;
m_isMemDC = false;
m_isScreenDC = false;
Init();
m_font = window->GetFont();
m_window = (WXWindow*) window->GetMainWindow();
@ -212,7 +205,6 @@ wxWindowDC::wxWindowDC( wxWindow *window )
m_display = (WXDisplay *) wxGlobalDisplay();
#if wxUSE_UNICODE
m_context = wxTheApp->GetPangoContext();
m_fontdesc = window->GetFont().GetNativeFontInfo()->description;
#endif