From 82a0227c20c7e6c3bc2544fdd7b026e3ccb7a96c Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 15 Jan 2024 22:33:50 +0300 Subject: [PATCH] Don't plot polygon borders when they are disabled. --- common/plotters/HPGL_plotter.cpp | 5 ++++- common/plotters/PDF_plotter.cpp | 3 +++ common/plotters/PS_plotter.cpp | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/plotters/HPGL_plotter.cpp b/common/plotters/HPGL_plotter.cpp index 1b2306b3a8..3975107390 100644 --- a/common/plotters/HPGL_plotter.cpp +++ b/common/plotters/HPGL_plotter.cpp @@ -448,6 +448,9 @@ void HPGL_PLOTTER::Circle( const VECTOR2I& aCenter, int aDiameter, FILL_T aFill, void HPGL_PLOTTER::PlotPoly( const std::vector& aCornerList, FILL_T aFill, int aWidth, void* aData ) { + if( aFill == FILL_T::NO_FILL && aWidth <= 0 ) + return; + if( aCornerList.size() <= 1 ) return; @@ -462,7 +465,7 @@ void HPGL_PLOTTER::PlotPoly( const std::vector& aCornerList, FILL_T aF MoveTo( aCornerList[0] ); startItem( userToDeviceCoordinates( aCornerList[0] ) ); - if( aFill == FILL_T::FILLED_SHAPE || aFill == FILL_T::FILLED_WITH_COLOR ) + if( aFill != FILL_T::NO_FILL ) { // Draw the filled area SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH ); diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index 305316bd96..06d4e563bd 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -391,6 +391,9 @@ void PDF_PLOTTER::PlotPoly( const std::vector& aCornerList, FILL_T aFi { wxASSERT( m_workFile ); + if( aFill == FILL_T::NO_FILL && aWidth <= 0 ) + return; + if( aCornerList.size() <= 1 ) return; diff --git a/common/plotters/PS_plotter.cpp b/common/plotters/PS_plotter.cpp index bff3672374..ffe4a205eb 100644 --- a/common/plotters/PS_plotter.cpp +++ b/common/plotters/PS_plotter.cpp @@ -561,6 +561,9 @@ void PS_PLOTTER::Arc( const VECTOR2D& aCenter, const EDA_ANGLE& aStartAngle, void PS_PLOTTER::PlotPoly( const std::vector& aCornerList, FILL_T aFill, int aWidth, void* aData ) { + if( aFill == FILL_T::NO_FILL && aWidth <= 0 ) + return; + if( aCornerList.size() <= 1 ) return;