From 70783811756240bd9f53a284b506b1217e75ad67 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 3 Jul 2023 02:04:08 +0300 Subject: [PATCH] Eeschema printing: fix bg fill when paper orientation or size differs. (cherry picked from commit 86458ae5826e09f19d7a375e5ecc87e765989eb4) --- eeschema/dialogs/dialog_print_using_printer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index 0475ec3c0b..0b920373bf 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -468,11 +468,15 @@ void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen ) // All the coordinates will be rotated 90 deg when printing, // so the X,Y offset vector must be rotated -90 deg before printing std::swap( xoffset, yoffset ); + std::swap( fitRect.width, fitRect.height ); yoffset = -yoffset; } matrix.Translate( xoffset, yoffset ); dc->SetTransformMatrix( matrix ); + + fitRect.x -= xoffset; + fitRect.y -= yoffset; } else {