#include "wx/dcmemory.h"
#include "wx/math.h"
#include "wx/image.h"
+ #include "wx/dcclient.h"
#endif
#ifdef __VMS__
pixel = m_backgroundPixel;
else
{
- pixel = CalculatePixel(m_pen.GetColour(), m_currentColour, false);
+ wxColour penClr = m_pen.GetColour();
+ pixel = CalculatePixel( penClr, m_currentColour, false);
+ m_pen.SetColour(penClr);
}
// Finally, set the GC to the required colour
// must test m_logicalFunction, because it involves background!
if (!sameColour || !GET_OPTIMIZATION || m_logicalFunction == wxXOR)
{
- WXPixel pixel = CalculatePixel(m_brush.GetColour(), m_currentColour, true);
+ wxColour brushClr = m_brush.GetColour();
+ WXPixel pixel = CalculatePixel( brushClr, m_currentColour, true);
+ m_brush.SetColour(brushClr);
if (pixel > -1)
SetForegroundPixelWithLogicalFunction(pixel);
}
}
-void wxWindowDCImpl::DoSetClippingRegionAsRegion( const wxRegion& region )
+void wxWindowDCImpl::DoSetDeviceClippingRegion( const wxRegion& region )
{
SetDCClipping(region.GetX11Region());
wxRect box = region.GetBox();
XRectangle rects[1];
- rects[0].x = (short)XLOG2DEV_2(box.x);
- rects[0].y = (short)YLOG2DEV_2(box.y);
- rects[0].width = (unsigned short)XLOG2DEVREL(box.width);
- rects[0].height = (unsigned short)YLOG2DEVREL(box.height);
+ rects[0].x = (short)box.x;
+ rects[0].y = (short)box.y;
+ rects[0].width = (unsigned short)box.width;
+ rects[0].height = (unsigned short)box.height;
XSetClipRectangles((Display*) m_display, (GC) m_gcBacking,
0, 0, rects, 1, Unsorted);
}