X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fce127d758a53bec28bce0c66f52a2e03ae9bf4b..03c6117e8f6c958c1bc2602132ded643fc703cbf:/src/motif/dcclient.cpp diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index 375f968e95..32f80903e4 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -46,6 +46,7 @@ #include "wx/dcmemory.h" #include "wx/math.h" #include "wx/image.h" + #include "wx/dcclient.h" #endif #ifdef __VMS__ @@ -236,7 +237,7 @@ bool wxWindowDCImpl::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const wxMemoryDC memdc; wxBitmap bitmap(1, 1); memdc.SelectObject(bitmap); - memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1); + memdc.Blit(0, 0, 1, 1, GetOwner(), x1, y1); memdc.SelectObject(wxNullBitmap); wxImage image = bitmap.ConvertToImage(); col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0)); @@ -1735,7 +1736,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) pixel = m_backgroundPixel; else { - pixel = CalculatePixel(m_pen.GetColour(), m_currentColour, false); + pixel = CalculatePixel( (wxColour&) m_pen.GetColour(), m_currentColour, false); } // Finally, set the GC to the required colour @@ -1897,7 +1898,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) // must test m_logicalFunction, because it involves background! if (!sameColour || !GET_OPTIMIZATION || m_logicalFunction == wxXOR) { - WXPixel pixel = CalculatePixel(m_brush.GetColour(), m_currentColour, true); + WXPixel pixel = CalculatePixel( (wxColour&) m_brush.GetColour(), m_currentColour, true); if (pixel > -1) SetForegroundPixelWithLogicalFunction(pixel); @@ -2098,7 +2099,7 @@ void wxWindowDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, } } -void wxWindowDCImpl::DoSetClippingRegionAsRegion( const wxRegion& region ) +void wxWindowDCImpl::DoSetDeviceClippingRegion( const wxRegion& region ) { SetDCClipping(region.GetX11Region()); @@ -2109,10 +2110,10 @@ void wxWindowDCImpl::DoSetClippingRegionAsRegion( const wxRegion& region ) 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); }