#include "wx/dcmemory.h"
#include "wx/image.h"
#include "wx/gtk/win_gtk.h"
-#include <math.h> // for floating-point functions
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
+#include <math.h> // for floating-point functions
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// local data
wxASSERT_MSG( widget, wxT("DC needs a widget") );
- GtkMyFixed *myfixed = GTK_MYFIXED( widget );
- m_window = myfixed->bin_window;
+ GtkPizza *pizza = GTK_PIZZA( widget );
+ m_window = pizza->bin_window;
/* not realized ? */
if (!m_window)
wxCoord wxWindowDC::GetCharWidth() const
{
GdkFont *font = m_font.GetInternalFont( m_scaleY );
+ wxCHECK_MSG( font, -1, _T("invalid font") );
+
return wxCoord(gdk_string_width( font, "H" ) / m_scaleX);
}
wxCoord wxWindowDC::GetCharHeight() const
{
GdkFont *font = m_font.GetInternalFont( m_scaleY );
+ wxCHECK_MSG( font, -1, _T("invalid font") );
+
return wxCoord((font->ascent + font->descent) / m_scaleY);
}