- m_MGLDC->setClipRect(MGLRect(0, 0, m_MGLDC->sizex(), m_MGLDC->sizey()));
- m_clipping = FALSE;
- m_currentClippingRegion.Clear();
+ if ( !m_globalClippingRegion.IsNull() )
+ {
+ m_MGLDC->setClipRegion(m_globalClippingRegion.GetMGLRegion());
+ m_currentClippingRegion = m_globalClippingRegion;
+ m_clipping = TRUE;
+ }
+ else
+ {
+ m_MGLDC->setClipRect(MGLRect(0, 0, m_MGLDC->sizex(), m_MGLDC->sizey()));
+ m_clipping = FALSE;
+ m_currentClippingRegion.Clear();
+ }