m_MGLDC = mgldc;
m_OwnsMGLDC = OwnsMGLDC;
m_ok = TRUE;
-
- if ( mgldc->getDC()->a.clipRegion )
- {
- MGLRegion clip;
- mgldc->getClipRegion(clip);
- m_globalClippingRegion = wxRegion(clip);
- // FIXME_MGL -- reuse wxWindows::m_updateRegion ?
- m_currentClippingRegion = m_globalClippingRegion;
- m_clipping = TRUE;
- }
+
+ if ( !m_globalClippingRegion.IsNull() )
+ SetClippingRegion(m_globalClippingRegion);
InitializeMGLDC();
}
}
else
{
- m_MGLDC->setClipRect(MGLRect(0, 0, m_MGLDC->sizex(), m_MGLDC->sizey()));
+ m_MGLDC->setClipRect(MGLRect(0, 0, m_MGLDC->sizex()+1, m_MGLDC->sizey()+1));
m_clipping = FALSE;
m_currentClippingRegion.Clear();
}
m_MGLDC->makeCurrent(); // will go away with MGL6.0
if ( !m_penSelected )
SelectPen();
- m_MGLDC->line(XLOG2DEV(x1) + m_penOfsX, XLOG2DEV(y1) + m_penOfsY,
- XLOG2DEV(x2) + m_penOfsX, XLOG2DEV(y2) + m_penOfsY);
+ m_MGLDC->lineExt(XLOG2DEV(x1) + m_penOfsX, XLOG2DEV(y1) + m_penOfsY,
+ XLOG2DEV(x2) + m_penOfsX, XLOG2DEV(y2) + m_penOfsY,FALSE);
CalcBoundingBox(x1, y1);
CalcBoundingBox(x2, y2);
}
void wxDC::DoGetSize(int *w, int *h) const
{
- if (w) *w = m_MGLDC->sizex();
- if (h) *h = m_MGLDC->sizey();
+ if (w) *w = m_MGLDC->sizex()+1;
+ if (h) *h = m_MGLDC->sizey()+1;
}
void wxDC::DoGetSizeMM(int *width, int *height) const