graphics context additions and merging graphics bitmap additions from Kevin O.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-03-05 21:14:28 +00:00
parent 9786ef0172
commit cc2cc2c4e0

View File

@@ -135,19 +135,18 @@ void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height )
void wxOverlayImpl::BeginDrawing( wxDC* dc)
{
wxDCImpl *impl = dc->GetImpl();
wxWindowDCImpl *win_impl = wxDynamicCast(impl,wxWindowDCImpl);
wxGCDCImpl *win_impl = wxDynamicCast(impl,wxGCDCImpl);
if (win_impl)
{
win_impl->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) );
wxSize size = dc->GetSize() ;
dc->SetClippingRegion( 0 , 0 , size.x , size.y ) ;
dc->SetClippingRegion( m_x , m_y , m_width , m_height ) ;
}
}
void wxOverlayImpl::EndDrawing( wxDC* dc)
{
wxDCImpl *impl = dc->GetImpl();
wxWindowDCImpl *win_impl = wxDynamicCast(impl,wxWindowDCImpl);
wxGCDCImpl *win_impl = wxDynamicCast(impl,wxGCDCImpl);
if (win_impl)
win_impl->SetGraphicsContext(NULL);