X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c257d44dd201f502a0e9a4bcff95958c6cd28182..15678bec37c6e3cb8a67a8b041579af595d4ccf3:/src/mac/dc.cpp?ds=sidebyside diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index acad87440d..f4bf8ea95c 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -38,7 +38,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) #define twips2mm 0.0176388888889 #define mm2pt 2.83464566929 #define pt2mm 0.352777777778 -#ifndef __UNIX__ +#ifndef __DARWIN__ const double M_PI = 3.14159265358979 ; #endif const double RAD2DEG = 180.0 / M_PI; @@ -944,12 +944,19 @@ bool wxDC::CanDrawBitmap(void) const bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, - wxDC *source, wxCoord xsrc, wxCoord ysrc, int logical_func , bool useMask ) + wxDC *source, wxCoord xsrc, wxCoord ysrc, int logical_func , bool useMask, + wxCoord xsrcMask, wxCoord ysrcMask ) { wxCHECK_MSG(Ok(), false, wxT("wxDC::DoBlit Illegal dc")); wxCHECK_MSG(source->Ok(), false, wxT("wxDC::DoBlit Illegal source DC")); wxMacPortSetter helper(this) ; + /* TODO: use the mask origin when drawing transparently */ + if (xsrcMask == -1 && ysrcMask == -1) + { + xsrcMask = xsrc; ysrcMask = ysrc; + } + CGrafPtr sourcePort = (CGrafPtr) source->m_macPort ; PixMapHandle bmappixels = GetGWorldPixMap( sourcePort ) ; RGBColor white = { 0xFFFF, 0xFFFF,0xFFFF} ;