X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a624f6ed375e4dbf126743ff1068486cb5241a2..59b7da02ff62a33862accc13158870f2a9a23630:/src/dfb/dc.cpp diff --git a/src/dfb/dc.cpp b/src/dfb/dc.cpp index 16257ca195..02bc3d22fa 100644 --- a/src/dfb/dc.cpp +++ b/src/dfb/dc.cpp @@ -95,10 +95,19 @@ void wxDFBDCImpl::DoSetClippingRegion(wxCoord cx, wxCoord cy, wxCoord cw, wxCoor m_clipping = true; } -void wxDFBDCImpl::DoSetClippingRegionAsRegion(const wxRegion& region) +void wxDFBDCImpl::DoSetDeviceClippingRegion(const wxRegion& region) { // NB: this can be done because wxDFB only supports rectangular regions - GetOwner()->SetClippingRegion(region.AsRect()); + wxRect rect = region.AsRect(); + + // our parameter is in physical coordinates while DoSetClippingRegion() + // takes logical ones + rect.x = XDEV2LOG(rect.x); + rect.y = YDEV2LOG(rect.y); + rect.width = XDEV2LOG(rect.width); + rect.height = YDEV2LOG(rect.height); + + DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); } void wxDFBDCImpl::DestroyClippingRegion() @@ -139,10 +148,10 @@ void wxDFBDCImpl::Clear() } extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, - const wxColour & col, int style); + const wxColour & col, wxFloodFillStyle style); bool wxDFBDCImpl::DoFloodFill(wxCoord x, wxCoord y, - const wxColour& col, int style) + const wxColour& col, wxFloodFillStyle style) { return wxDoFloodFill(GetOwner(), x, y, col, style); } @@ -232,7 +241,7 @@ void wxDFBDCImpl::DoDrawPoint(wxCoord x, wxCoord y) void wxDFBDCImpl::DoDrawPolygon(int WXUNUSED(n), wxPoint WXUNUSED(points)[], wxCoord WXUNUSED(xoffset), wxCoord WXUNUSED(yoffset), - int WXUNUSED(fillStyle)) + wxPolygonFillMode WXUNUSED(fillStyle)) { wxCHECK_RET( IsOk(), wxT("invalid dc") ); @@ -432,7 +441,7 @@ void wxDFBDCImpl::SetBackgroundMode(int mode) m_backgroundMode = mode; } -void wxDFBDCImpl::SetLogicalFunction(int function) +void wxDFBDCImpl::SetLogicalFunction(wxRasterOperationMode function) { wxCHECK_RET( IsOk(), wxT("invalid dc") ); @@ -574,7 +583,7 @@ wxSize wxDFBDCImpl::GetPPI() const bool wxDFBDCImpl::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - int rop, bool useMask, + wxRasterOperationMode rop, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask) { wxCHECK_MSG( IsOk(), false, "invalid dc" );