From 6e35d5473e5c976b2062e6f82e26415daf7a8317 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 8 Apr 2022 12:40:41 +0200 Subject: [PATCH] Fix an issue on wxWidgets 3.1.6 when printing bitmaps --- common/bitmap_base.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/bitmap_base.cpp b/common/bitmap_base.cpp index 3ca628c74e..d3fbbd9a86 100644 --- a/common/bitmap_base.cpp +++ b/common/bitmap_base.cpp @@ -6,7 +6,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 jean-pierre.charras - * Copyright (C) 2011-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2011-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -261,8 +261,12 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const VECTOR2I& aPos ) matrix.Translate( pos.x, pos.y ); matrix.Scale( GetScalingFactor(), GetScalingFactor() ); aDC->SetTransformMatrix( matrix ); + #if !wxCHECK_VERSION( 3, 1, 6 ) clipAreaPos.x = pos.x; clipAreaPos.y = pos.y; + #else + clipAreaPos.x = clipAreaPos.y = 0; + #endif pos.x = pos.y = 0; } else