X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f7b34a878bbcb2f71a0c7694e2a3bec51460218..53997bc265b691aaf12fafd259a5a2d2a27b0565:/src/mgl/dc.cpp diff --git a/src/mgl/dc.cpp b/src/mgl/dc.cpp index ecaa40dc6a..e33904e99a 100644 --- a/src/mgl/dc.cpp +++ b/src/mgl/dc.cpp @@ -1387,7 +1387,8 @@ wxSize wxDC::GetPPI() const bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - int rop, bool useMask) + int rop, bool useMask, + wxCoord xsrcMask, wxCoord ysrcMask) { wxCHECK_MSG( Ok(), FALSE, wxT("invalid dc") ); wxCHECK_MSG( source, FALSE, wxT("invalid source dc") ); @@ -1396,6 +1397,17 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, xsrc = source->LogicalToDeviceX(xsrc); ysrc = source->LogicalToDeviceY(ysrc); + /* TODO: use the mask origin when drawing transparently */ + if (xsrcMask == -1 && ysrcMask == -1) + { + xsrcMask = xsrc; ysrcMask = ysrc; + } + else + { + xsrcMask = source->LogicalToDeviceX(xsrcMask); + ysrcMask = source->LogicalToDeviceY(ysrcMask); + } + CalcBoundingBox(xdest, ydest); CalcBoundingBox(xdest + width, ydest + height);