Removed the SaveBG hack. The real incompatibility is that the MemoryDC
is not automatically cleared to the BG colour of the window when a temporary bitmap is used. Inlined the rest of the methods, there really is no reason for them not to be. (will remove dcbuffer.cpp as soon as I figure out the bakefiles) Do device to logical transforms in UnMask. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,66 +9,3 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma implementation "dcbuffer.h"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/window.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dcbuffer.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Double buffering helper.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxBufferedDC::wxBufferedDC(wxDC *dc, const wxBitmap& buffer)
|
||||
: m_dc( dc ),
|
||||
m_buffer( buffer )
|
||||
{
|
||||
UseBuffer();
|
||||
}
|
||||
|
||||
wxBufferedDC::wxBufferedDC(wxDC *dc, const wxSize& area, int flags)
|
||||
: m_dc( dc ),
|
||||
m_buffer( area.GetWidth(), area.GetHeight() )
|
||||
{
|
||||
UseBuffer();
|
||||
|
||||
SaveBg(area, flags);
|
||||
}
|
||||
|
||||
void wxBufferedDC::Init( wxDC *dc, const wxBitmap &buffer )
|
||||
{
|
||||
wxASSERT_MSG( m_dc == 0 && m_buffer == wxNullBitmap,
|
||||
_T("wxBufferedDC already initialised") );
|
||||
|
||||
m_dc = dc;
|
||||
m_buffer = buffer;
|
||||
|
||||
UseBuffer();
|
||||
}
|
||||
|
||||
void wxBufferedDC::Init(wxDC *dc, const wxSize& area, int flags)
|
||||
{
|
||||
Init(dc, wxBitmap(area.GetWidth(), area.GetHeight()));
|
||||
|
||||
SaveBg(area, flags);
|
||||
}
|
||||
|
||||
void wxBufferedDC::UnMask()
|
||||
{
|
||||
wxASSERT_MSG( m_dc != 0,
|
||||
_T("No underlying DC associated with wxBufferedDC (anymore)") );
|
||||
|
||||
m_dc->Blit( 0, 0, m_buffer.GetWidth(), m_buffer.GetHeight(), this, 0, 0 );
|
||||
m_dc = NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user