Added wxMemoryDC::SelectObjectAsSource() and make SelectObject() unshare
the bitmap to ensure that no other bitmaps are modified; also remove some code duplication by introducing wxMemoryDCBase (patch 1580745) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -930,7 +930,7 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
// transparent pen) one pixel smaller in both directions and we want them
|
||||
// to have the same size regardless of which pen is used - adjust
|
||||
|
||||
// I wonder if this shouldn<EFBFBD>t be done after the LOG2DEV() conversions. RR.
|
||||
// I wonder if this shouldnt be done after the LOG2DEV() conversions. RR.
|
||||
if ( m_pen.GetStyle() == wxTRANSPARENT )
|
||||
{
|
||||
// Apparently not needed for WinCE (see e.g. Life! demo)
|
||||
@@ -1245,7 +1245,8 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask
|
||||
// Rather than reproduce wxDC::Blit, let's do it at the wxWin API
|
||||
// level
|
||||
wxMemoryDC memDC;
|
||||
memDC.SelectObject(bmp);
|
||||
|
||||
memDC.SelectObjectAsSource(bmp);
|
||||
|
||||
Blit(x, y, width, height, &memDC, 0, 0, wxCOPY, useMask);
|
||||
|
||||
|
Reference in New Issue
Block a user