changing compositing mode for Clear, see #12756
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -57,8 +57,10 @@ static bool TranslateRasterOp(wxRasterOperationMode function, wxCompositionMode
|
|||||||
{
|
{
|
||||||
switch ( function )
|
switch ( function )
|
||||||
{
|
{
|
||||||
case wxCOPY: // (default) src
|
case wxCOPY: // src
|
||||||
*op = wxCOMPOSITION_SOURCE; //
|
// since we are supporting alpha, _OVER is closer to the intention than _SOURCE
|
||||||
|
// since the latter would overwrite even when alpha is is not set to opaque
|
||||||
|
*op = wxCOMPOSITION_OVER;
|
||||||
break;
|
break;
|
||||||
case wxOR: // src OR dst
|
case wxOR: // src OR dst
|
||||||
*op = wxCOMPOSITION_ADD;
|
*op = wxCOMPOSITION_ADD;
|
||||||
@@ -1047,7 +1049,10 @@ void wxGCDCImpl::Clear(void)
|
|||||||
m_graphicContext->SetBrush( m_backgroundBrush );
|
m_graphicContext->SetBrush( m_backgroundBrush );
|
||||||
wxPen p = *wxTRANSPARENT_PEN;
|
wxPen p = *wxTRANSPARENT_PEN;
|
||||||
m_graphicContext->SetPen( p );
|
m_graphicContext->SetPen( p );
|
||||||
|
wxCompositionMode formerMode = m_graphicContext->GetCompositionMode();
|
||||||
|
m_graphicContext->SetCompositionMode(wxCOMPOSITION_SOURCE);
|
||||||
DoDrawRectangle( 0, 0, 32000 , 32000 );
|
DoDrawRectangle( 0, 0, 32000 , 32000 );
|
||||||
|
m_graphicContext->SetCompositionMode(formerMode);
|
||||||
m_graphicContext->SetPen( m_pen );
|
m_graphicContext->SetPen( m_pen );
|
||||||
m_graphicContext->SetBrush( m_brush );
|
m_graphicContext->SetBrush( m_brush );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user