X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8ec418aee4e38877d4cb79e2984c766dcc358..837f2b68727278f7b913e424709678ca6b8dd115:/src/mgl/dc.cpp diff --git a/src/mgl/dc.cpp b/src/mgl/dc.cpp index edbfd13c3b..bc91b0e75e 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 ///////////////////////////////////////////////////////////////////////////// @@ -765,7 +765,7 @@ void wxDC::DrawAnyText(const wxString& text, wxCoord x, wxCoord y) if ( m_font.GetUnderlined() ) { int x1 = xx, y1 = yy; - int x2, y2; + int x2 = 0 , y2 = 0; int w = m_MGLDC->textWidth(c_text); m_MGLDC->underScoreLocation(x1, y1, c_text); switch (m_MGLDC->getTextDirection()) @@ -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); + /* FIXME_MGL: 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);