X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8ec418aee4e38877d4cb79e2984c766dcc358..0d58bb65789a8efec581d2beb2117669d1d1db9d:/src/mgl/dc.cpp?ds=sidebyside diff --git a/src/mgl/dc.cpp b/src/mgl/dc.cpp index edbfd13c3b..e33904e99a 100644 --- a/src/mgl/dc.cpp +++ b/src/mgl/dc.cpp @@ -4,7 +4,7 @@ // Author: Vaclav Slavik // Created: 2001/03/09 // RCS-ID: $Id$ -// Copyright: (c) Vaclav Slavik +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -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);