PLOTTER: do not clamp coordinates to an arbitrary value.

Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes #11196
https://gitlab.com/kicad/code/kicad/issues/11196
This commit is contained in:
jean-pierre charras
2022-03-22 10:32:36 +01:00
parent 9722a05820
commit 21144481d2
6 changed files with 13 additions and 16 deletions
-6
View File
@@ -92,12 +92,6 @@ VECTOR2D PLOTTER::userToDeviceCoordinates( const VECTOR2I& aCoordinate )
{
VECTOR2I pos = aCoordinate - m_plotOffset;
// Don't allow overflows; they can cause rendering failures in some file viewers
// (such as Acrobat)
int clampSize = MAX_PAGE_SIZE_MILS * m_IUsPerDecimil * 10 / 2;
pos.x = std::max( -clampSize, std::min( pos.x, clampSize ) );
pos.y = std::max( -clampSize, std::min( pos.y, clampSize ) );
double x = pos.x * m_plotScale;
double y = ( m_paperSize.y - pos.y * m_plotScale );