X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/938aa9c4618c9ed67fa791063681875106d3ef35..2d956b58023a4955313a1c1531bc70a0deb0b831:/src/os2/dc.cpp?ds=sidebyside diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index 9912e149ce..cb5f939294 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -557,7 +557,7 @@ void wxDC::Clear() ::GpiErase(m_hPS); } // end of wxDC::Clear -void wxDC::DoFloodFill( +bool wxDC::DoFloodFill( wxCoord vX , wxCoord vY , const wxColour& rCol @@ -577,6 +577,8 @@ void wxDC::DoFloodFill( lOptions = FF_SURFACE; ::GpiFloodFill(m_hPS, lOptions, lColor); + + return TRUE; } // end of wxDC::DoFloodFill bool wxDC::DoGetPixel( @@ -1198,16 +1200,48 @@ void wxDC::DoDrawBitmap( , bool bUseMask ) { - POINTL vPoint = {vX, vY}; + if (!bUseMask && !IsKindOf(CLASSINFO(wxPrinterDC))) + { + HBITMAP hBitmap = (HBITMAP)rBmp.GetHBITMAP(); + wxBitmap vNewBitmap( rBmp.GetWidth() + ,rBmp.GetHeight() + ,rBmp.GetDepth() + ); + HBITMAP hBitmapOld = ::GpiSetBitmap((HPS)GetHPS(), vNewBitmap.GetHBITMAP()); + LONG lOldTextground = ::GpiQueryColor((HPS)GetHPS()); + LONG lOldBackground = ::GpiQueryBackColor((HPS)GetHPS()); + + if (m_textForegroundColour.Ok()) + { + ::GpiSetColor( (HPS)GetHPS() + ,m_textForegroundColour.GetPixel() + ); + } + if (m_textBackgroundColour.Ok()) + { + ::GpiSetBackColor( (HPS)GetHPS() + ,m_textBackgroundColour.GetPixel() + ); + } - ::WinDrawBitmap( GetHPS() - ,(HBITMAP)GetHbitmapOf(rBmp) - ,NULL - ,&vPoint - ,0L - ,0L - ,DBM_NORMAL - ); + vY = OS2Y(vY,rBmp.GetHeight()); + + POINTL vPoint[4] = { vX, vY + rBmp.GetHeight() + ,vX + rBmp.GetWidth(), vY + ,0, 0 + ,rBmp.GetWidth(), rBmp.GetHeight() + }; + ::GpiWCBitBlt( (HPS)GetHPS() + ,hBitmap + ,4 + ,vPoint + ,ROP_SRCCOPY + ,BBO_IGNORE + ); + ::GpiSetBitmap((HPS)GetHPS(), hBitmapOld); + ::GpiSetColor((HPS)GetHPS(), lOldTextground); + ::GpiSetBackColor((HPS)GetHPS(), lOldBackground); + } } // end of wxDC::DoDrawBitmap void wxDC::DoDrawText(