//
public:
-
- bool m_ok;
- bool m_colour;
-
- // not sure, what these mean
- bool m_clipping; // Is clipping on right now ?
- bool m_isInteractive; // Is GetPixel possible ?
- bool m_autoSetting; // wxMSW only ?
- bool m_dontDelete; // wxMSW only ?
- bool m_optimize; // wxMSW only ?
- wxString m_filename; // Not sure where this belongs.
-
- wxPen m_pen;
- wxBrush m_brush;
- wxBrush m_backgroundBrush;
- wxColour m_textForegroundColour;
- wxColour m_textBackgroundColour;
- wxFont m_font;
-
- int m_logicalFunction;
- int m_backgroundMode;
- int m_textAlignment; // gone in wxWin 2.0 ?
-
- int m_mappingMode;
-
- // not sure what for, but what is a mm on a screen you don't know the size of?
+//begin wxmac
double m_mm_to_pix_x,m_mm_to_pix_y;
-
+ bool m_needComputeScaleX,m_needComputeScaleY; // not yet used
long m_internalDeviceOriginX,m_internalDeviceOriginY; // If un-scrolled is non-zero or
// d.o. changes with scrolling.
// Set using SetInternalDeviceOrigin().
long m_externalDeviceOriginX,m_externalDeviceOriginY; // To be set by external classes
// such as wxScrolledWindow
// using SetDeviceOrigin()
-
- long m_deviceOriginX,m_deviceOriginY; // Sum of the two above.
-
- long m_logicalOriginX,m_logicalOriginY; // User defined.
-
- double m_scaleX,m_scaleY;
- double m_logicalScaleX,m_logicalScaleY;
- double m_userScaleX,m_userScaleY;
- long m_signX,m_signY;
-
- bool m_needComputeScaleX,m_needComputeScaleY; // not yet used
-
- float m_scaleFactor; // wxPSDC wants to have this. Will disappear.
-
- long m_clipX1,m_clipY1,m_clipX2,m_clipY2;
- long m_minX,m_maxX,m_minY,m_maxY;
-
-//begin wxmac
GrafPtr m_macPort ;
GWorldPtr m_macMask ;
wxDC::wxDC()
{
m_ok = FALSE;
- m_optimize = FALSE;
- m_autoSetting = FALSE;
+// m_optimize = FALSE;
+// m_autoSetting = FALSE;
m_colour = TRUE;
m_clipping = FALSE;
if (m_pen.GetStyle() != wxTRANSPARENT)
{
MacInstallPen() ;
- int offset = (m_pen.GetWidth() - 1) / 2 ;
+ int offset = ( (m_pen.GetWidth() == 0 ? 1 : m_pen.GetWidth() ) * m_scaleX - 1) / 2 ;
long xx1 = XLOG2DEV(x1);
long yy1 = YLOG2DEV(y1);
long xx2 = XLOG2DEV(x2);
::RGBBackColor( &backcolor );
::PenNormal() ;
- int penWidth = m_pen.GetWidth();
+ int penWidth = m_pen.GetWidth() * m_scaleX ;
+
+ // null means only one pixel, at whatever resolution
+ if ( penWidth == 0 )
+ penWidth = 1 ;
::PenSize(penWidth, penWidth);
int penStyle = m_pen.GetStyle();
m_cap = wxCAP_ROUND ;
m_nbDash = 0 ;
m_dash = 0 ;
-/* TODO: null data
- m_hPen = 0;
-*/
}
wxPenRefData::wxPenRefData(const wxPenRefData& data)
m_nbDash = data.m_nbDash;
m_dash = data.m_dash;
m_colour = data.m_colour;
-/* TODO: null data
- m_hPen = 0;
-*/
}
wxPenRefData::~wxPenRefData()
{
- // TODO: delete data
}
// Pens
bool wxPen::RealizeResource()
{
- // TODO: create actual pen
- return FALSE;
+ // nothing to do here for mac
+ return TRUE;
}
wxDC::wxDC()
{
m_ok = FALSE;
- m_optimize = FALSE;
- m_autoSetting = FALSE;
+// m_optimize = FALSE;
+// m_autoSetting = FALSE;
m_colour = TRUE;
m_clipping = FALSE;
if (m_pen.GetStyle() != wxTRANSPARENT)
{
MacInstallPen() ;
- int offset = (m_pen.GetWidth() - 1) / 2 ;
+ int offset = ( (m_pen.GetWidth() == 0 ? 1 : m_pen.GetWidth() ) * m_scaleX - 1) / 2 ;
long xx1 = XLOG2DEV(x1);
long yy1 = YLOG2DEV(y1);
long xx2 = XLOG2DEV(x2);
::RGBBackColor( &backcolor );
::PenNormal() ;
- int penWidth = m_pen.GetWidth();
+ int penWidth = m_pen.GetWidth() * m_scaleX ;
+
+ // null means only one pixel, at whatever resolution
+ if ( penWidth == 0 )
+ penWidth = 1 ;
::PenSize(penWidth, penWidth);
int penStyle = m_pen.GetStyle();
m_cap = wxCAP_ROUND ;
m_nbDash = 0 ;
m_dash = 0 ;
-/* TODO: null data
- m_hPen = 0;
-*/
}
wxPenRefData::wxPenRefData(const wxPenRefData& data)
m_nbDash = data.m_nbDash;
m_dash = data.m_dash;
m_colour = data.m_colour;
-/* TODO: null data
- m_hPen = 0;
-*/
}
wxPenRefData::~wxPenRefData()
{
- // TODO: delete data
}
// Pens
bool wxPen::RealizeResource()
{
- // TODO: create actual pen
- return FALSE;
+ // nothing to do here for mac
+ return TRUE;
}