diff --git a/common/plotters/SVG_plotter.cpp b/common/plotters/SVG_plotter.cpp index 6bf4d7971f..83f8e1850d 100644 --- a/common/plotters/SVG_plotter.cpp +++ b/common/plotters/SVG_plotter.cpp @@ -6,8 +6,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 1992-2020 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 @@ -648,11 +648,9 @@ void SVG_PLOTTER::PlotImage( const wxImage& aImage, const wxPoint& aPos, fprintf( outputFile, "\n" ); } - fprintf( outputFile, "\"\npreserveAspectRatio=\"none\" height=\"%f\" width=\"%f\" />", + fprintf( outputFile, "\"\npreserveAspectRatio=\"none\" width=\"%f\" height=\"%f\" />", userToDeviceSize( drawsize.x ), userToDeviceSize( drawsize.y ) ); } - - } @@ -712,7 +710,11 @@ bool SVG_PLOTTER::StartPlot() "\n", " \n", - "\n", + fprintf( outputFile, " width=\"%fcm\" height=\"%fcm\" viewBox=\"%d %d %d %d\">\n", (double) paperSize.x / m_IUsPerDecimil * 2.54 / 10000, (double) paperSize.y / m_IUsPerDecimil * 2.54 / 10000, origin.x, origin.y, (int) ( paperSize.x * iuPerDeviceUnit ), (int) ( paperSize.y * iuPerDeviceUnit) );