diff --git a/common/bitmap_base.cpp b/common/bitmap_base.cpp index ea712fa204..fb859588aa 100644 --- a/common/bitmap_base.cpp +++ b/common/bitmap_base.cpp @@ -269,8 +269,13 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos ) pos.x = KiROUND( pos.x / GetScalingFactor() ); pos.y = KiROUND( pos.y / GetScalingFactor() ); + size.x = KiROUND( size.x / GetScalingFactor() ); + size.y = KiROUND( size.y / GetScalingFactor() ); } + aDC->DestroyClippingRegion(); + aDC->SetClippingRegion( pos, size ); + if( GetGRForceBlackPenState() ) { wxBitmap result( m_bitmap->ConvertToImage().ConvertToGreyscale() ); @@ -288,6 +293,8 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos ) aDC->SetUserScale( scale, scale ); aDC->SetLogicalOrigin( logicalOriginX, logicalOriginY ); } + + aDC->DestroyClippingRegion(); }