X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32ea1f988de29c88fd96b468bea495b85c1a9c25..491b5be8305968871bc289453ed088a70c3de044:/src/mac/dc.cpp diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index 669a5bf526..f66cf27357 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -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} ; @@ -1276,10 +1283,9 @@ wxCoord wxDC::GetCharWidth(void) const MacInstallFont() ; - FontInfo fi ; - ::GetFontInfo( &fi ) ; + int width = ::TextWidth( "n" , 0 , 1 ) ; - return YDEV2LOGREL((fi.descent + fi.ascent) / 2) ; + return YDEV2LOGREL(width) ; } wxCoord wxDC::GetCharHeight(void) const