memdc.SelectObject(bitmap);
memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1);
memdc.SelectObject(wxNullBitmap);
+
wxImage image(bitmap);
col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0));
return TRUE;
wxCHECK_RET( font, wxT("invalid font") );
-#ifdef __WXGTK20__
+#if defined(__WXGTK20__)
wxCHECK_RET( m_context, wxT("no Pango context") );
#endif
x = XLOG2DEV(x);
y = YLOG2DEV(y);
-#ifdef __WXGTK20__
+#if defined(__WXGTK20__) && wxUSE_WCHAR_T
/* FIXME: the layout engine should probably be abstracted at a higher level in wxDC... */
PangoLayout *layout = pango_layout_new(m_context);
pango_layout_set_font_description(layout, m_fontdesc);
gdk_draw_line( m_window, m_textGC, x, ul_y, x + width, ul_y);
}
-#ifdef __WXGTK20__
+#if defined(__WXGTK20__) && wxUSE_WCHAR_T
g_object_unref( G_OBJECT( layout ) );
#endif
// Resolution in pixels per logical inch
wxSize wxWindowDC::GetPPI() const
{
- return wxSize(100, 100);
+ return wxSize( (int) (m_mm_to_pix_x * 25.4 + 0.5), (int) (m_mm_to_pix_y * 25.4 + 0.5));
}
int wxWindowDC::GetDepth() const