X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4bc67cc550bcd9d5f93f88ae22a4f6ac7fafb5f7..f4621a09f06512d0fcf8f70c5e3dc88818f02316:/src/gtk/dc.cpp diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index 44fe792814..2f287d17ad 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -14,6 +14,9 @@ #include "wx/dc.h" +#include "gdk/gdk.h" +#include "gtk/gtk.h" + //----------------------------------------------------------------------------- // constants //----------------------------------------------------------------------------- @@ -54,15 +57,17 @@ wxDC::wxDC() m_scaleX = 1.0; m_scaleY = 1.0; - m_mappingMode = MM_TEXT; - m_needComputeScaleX = FALSE; - m_needComputeScaleY = FALSE; + m_mappingMode = wxMM_TEXT; + m_needComputeScaleX = FALSE; /* not used yet */ + m_needComputeScaleY = FALSE; /* not used yet */ - m_signX = 1; // default x-axis left to right - m_signY = 1; // default y-axis top down + m_signX = 1; /* default x-axis left to right */ + m_signY = 1; /* default y-axis top down. -1 in postscript. */ - m_maxX = m_maxY = -100000; - m_minY = m_minY = 100000; + m_maxX = 0; + m_maxY = 0; + m_minX = 0; + m_minY = 0; m_logicalFunction = wxCOPY; // m_textAlignment = wxALIGN_TOP_LEFT; @@ -75,7 +80,7 @@ wxDC::wxDC() m_brush = *wxTRANSPARENT_BRUSH; m_backgroundBrush = *wxWHITE_BRUSH; -// m_palette = wxAPP_COLOURMAP; +// m_palette = wxAPP_COLOURMAP; /* I'll learn to handle palettes later in my life */ } wxDC::~wxDC() @@ -212,25 +217,25 @@ void wxDC::SetMapMode( int mode ) { switch (mode) { - case MM_TWIPS: + case wxMM_TWIPS: SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y ); break; - case MM_POINTS: + case wxMM_POINTS: SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y ); break; - case MM_METRIC: + case wxMM_METRIC: SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y ); break; - case MM_LOMETRIC: + case wxMM_LOMETRIC: SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 ); break; default: - case MM_TEXT: + case wxMM_TEXT: SetLogicalScale( 1.0, 1.0 ); break; } /* we don't do this mega optimisation - if (mode != MM_TEXT) + if (mode != wxMM_TEXT) { m_needComputeScaleX = TRUE; m_needComputeScaleY = TRUE;