#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/dcmemory.h"
+ #include "wx/math.h" // for floating-point functions
#endif
#include "wx/image.h"
#include "wx/gtk/win_gtk.h"
#include "wx/gtk/private.h"
-#include "wx/math.h" // for floating-point functions
-
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
/* background colour */
m_backgroundBrush = *wxWHITE_BRUSH;
m_backgroundBrush.GetColour().CalcPixel( m_cmap );
- GdkColor *bg_col = m_backgroundBrush.GetColour().GetColor();
+#ifdef __WXGTK24__
+ const GdkColor *bg_col = m_backgroundBrush.GetColour().GetColor();
+#else
+ GdkColor *bg_col = m_backgroundBrush.GetColour().GetColor();
+#endif
/* m_textGC */
m_textForegroundColour.CalcPixel( m_cmap );
void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, double angle )
{
+ if (!m_window || text.empty())
+ return;
+
+ wxCHECK_RET( Ok(), wxT("invalid window dc") );
+
if ( wxIsNullDouble(angle) )
{
DrawText(text, x, y);
return;
}
- wxCHECK_RET( Ok(), wxT("invalid window dc") );
-
- if (!m_window) return;
-
wxCoord w;
wxCoord h;