2018-09-19 13:06:29 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
2022-07-24 22:40:47 +00:00
|
|
|
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2018-09-19 13:06:29 +00:00
|
|
|
* Copyright (C) 2018 CERN
|
|
|
|
* Author: Maciej Suminski <maciej.suminski@cern.ch>
|
|
|
|
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "pcbnew_printout.h"
|
2020-11-12 20:19:22 +00:00
|
|
|
#include <board.h>
|
2020-01-07 17:12:59 +00:00
|
|
|
#include <math/util.h> // for KiROUND
|
2018-09-19 13:06:29 +00:00
|
|
|
#include <pcb_painter.h>
|
2020-01-13 01:44:19 +00:00
|
|
|
#include <pcbnew_settings.h>
|
2018-09-28 08:10:08 +00:00
|
|
|
#include <view/view.h>
|
2018-10-05 14:41:17 +00:00
|
|
|
#include <pcbplot.h>
|
2021-01-04 22:26:23 +00:00
|
|
|
#include <advanced_config.h>
|
2018-09-19 13:06:29 +00:00
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
PCBNEW_PRINTOUT_SETTINGS::PCBNEW_PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo )
|
|
|
|
: BOARD_PRINTOUT_SETTINGS( aPageInfo )
|
|
|
|
{
|
2021-04-16 12:12:55 +00:00
|
|
|
m_DrillMarks = SMALL_DRILL_SHAPE;
|
|
|
|
m_Pagination = ALL_LAYERS;
|
|
|
|
m_PrintEdgeCutsOnAllPages = true;
|
|
|
|
m_AsItemCheckboxes = false;
|
2018-10-05 14:41:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-13 01:44:19 +00:00
|
|
|
void PCBNEW_PRINTOUT_SETTINGS::Load( APP_SETTINGS_BASE* aConfig )
|
2018-10-05 14:41:17 +00:00
|
|
|
{
|
|
|
|
BOARD_PRINTOUT_SETTINGS::Load( aConfig );
|
2020-01-13 01:44:19 +00:00
|
|
|
|
2022-10-21 17:41:21 +00:00
|
|
|
if( PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( aConfig ) )
|
2020-01-13 01:44:19 +00:00
|
|
|
{
|
2021-04-16 12:12:55 +00:00
|
|
|
m_DrillMarks = static_cast<DRILL_MARK_SHAPE_T>( cfg->m_Plot.pads_drill_mode );
|
|
|
|
m_Pagination = static_cast<PAGINATION_T>( cfg->m_Plot.all_layers_on_one_page );
|
2021-12-19 15:43:02 +00:00
|
|
|
m_PrintEdgeCutsOnAllPages = cfg->m_Plot.edgecut_on_all_layers;
|
2020-11-16 11:16:44 +00:00
|
|
|
m_Mirror = cfg->m_Plot.mirror;
|
2020-01-13 01:44:19 +00:00
|
|
|
}
|
2018-10-05 14:41:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-13 01:44:19 +00:00
|
|
|
void PCBNEW_PRINTOUT_SETTINGS::Save( APP_SETTINGS_BASE* aConfig )
|
2018-10-05 14:41:17 +00:00
|
|
|
{
|
|
|
|
BOARD_PRINTOUT_SETTINGS::Save( aConfig );
|
2020-01-13 01:44:19 +00:00
|
|
|
|
2022-10-21 17:41:21 +00:00
|
|
|
if( PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( aConfig ) )
|
2020-01-13 01:44:19 +00:00
|
|
|
{
|
2021-04-16 12:12:55 +00:00
|
|
|
cfg->m_Plot.pads_drill_mode = m_DrillMarks;
|
|
|
|
cfg->m_Plot.all_layers_on_one_page = m_Pagination;
|
2021-12-19 15:43:02 +00:00
|
|
|
cfg->m_Plot.edgecut_on_all_layers = m_PrintEdgeCutsOnAllPages;
|
2020-11-16 11:16:44 +00:00
|
|
|
cfg->m_Plot.mirror = m_Mirror;
|
2020-01-13 01:44:19 +00:00
|
|
|
}
|
2018-10-05 14:41:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PCBNEW_PRINTOUT::PCBNEW_PRINTOUT( BOARD* aBoard, const PCBNEW_PRINTOUT_SETTINGS& aParams,
|
2022-10-21 17:41:21 +00:00
|
|
|
const KIGFX::VIEW* aView, const wxString& aTitle ) :
|
2018-10-06 16:51:46 +00:00
|
|
|
BOARD_PRINTOUT( aParams, aView, aTitle ), m_pcbnewSettings( aParams )
|
2018-09-19 13:06:29 +00:00
|
|
|
{
|
|
|
|
m_board = aBoard;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool PCBNEW_PRINTOUT::OnPrintPage( int aPage )
|
|
|
|
{
|
2020-04-20 16:00:00 +00:00
|
|
|
// Store the layerset, as it is going to be modified below and the original settings are
|
|
|
|
// needed.
|
2020-11-16 11:16:44 +00:00
|
|
|
LSET lset = m_settings.m_LayerSet;
|
2020-08-30 21:20:37 +00:00
|
|
|
int pageCount = lset.count();
|
|
|
|
wxString layerName;
|
2018-09-19 13:06:29 +00:00
|
|
|
PCB_LAYER_ID extractLayer;
|
|
|
|
|
|
|
|
// compute layer mask from page number if we want one page per layer
|
2021-04-16 12:12:55 +00:00
|
|
|
if( m_pcbnewSettings.m_Pagination == PCBNEW_PRINTOUT_SETTINGS::LAYER_PER_PAGE )
|
2018-09-19 13:06:29 +00:00
|
|
|
{
|
2020-04-20 16:00:00 +00:00
|
|
|
// This sequence is TBD, call a different sequencer if needed, such as Seq().
|
|
|
|
// Could not find documentation on page order.
|
2018-09-19 13:06:29 +00:00
|
|
|
LSEQ seq = lset.UIOrder();
|
|
|
|
|
|
|
|
// aPage starts at 1, not 0
|
|
|
|
if( unsigned( aPage - 1 ) < seq.size() )
|
2020-11-16 11:16:44 +00:00
|
|
|
m_settings.m_LayerSet = LSET( seq[ aPage - 1] );
|
2018-09-19 13:06:29 +00:00
|
|
|
}
|
|
|
|
|
2020-11-16 11:16:44 +00:00
|
|
|
if( !m_settings.m_LayerSet.any() )
|
2018-09-19 13:06:29 +00:00
|
|
|
return false;
|
|
|
|
|
2020-11-16 11:16:44 +00:00
|
|
|
extractLayer = m_settings.m_LayerSet.ExtractLayer();
|
2018-09-19 13:06:29 +00:00
|
|
|
|
|
|
|
if( extractLayer == UNDEFINED_LAYER )
|
2020-08-30 21:20:37 +00:00
|
|
|
layerName = _( "Multiple Layers" );
|
2018-09-19 13:06:29 +00:00
|
|
|
else
|
2022-06-10 13:09:22 +00:00
|
|
|
layerName = m_board->GetLayerName( extractLayer );
|
2018-09-19 13:06:29 +00:00
|
|
|
|
|
|
|
// In Pcbnew we can want the layer EDGE always printed
|
2021-04-16 12:12:55 +00:00
|
|
|
if( m_pcbnewSettings.m_PrintEdgeCutsOnAllPages )
|
2020-11-16 11:16:44 +00:00
|
|
|
m_settings.m_LayerSet.set( Edge_Cuts );
|
2018-09-19 13:06:29 +00:00
|
|
|
|
2020-08-30 21:20:37 +00:00
|
|
|
DrawPage( layerName, aPage, pageCount );
|
2018-09-19 13:06:29 +00:00
|
|
|
|
2018-09-28 08:10:08 +00:00
|
|
|
// Restore the original layer set, so the next page can be printed
|
2020-11-16 11:16:44 +00:00
|
|
|
m_settings.m_LayerSet = lset;
|
2018-09-19 13:06:29 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-10-06 16:51:46 +00:00
|
|
|
int PCBNEW_PRINTOUT::milsToIU( double aMils ) const
|
|
|
|
{
|
2022-09-16 23:25:07 +00:00
|
|
|
return KiROUND( pcbIUScale.IU_PER_MILS * aMils );
|
2018-10-06 16:51:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-17 11:56:07 +00:00
|
|
|
void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet )
|
2018-09-28 08:10:08 +00:00
|
|
|
{
|
|
|
|
BOARD_PRINTOUT::setupViewLayers( aView, aLayerSet );
|
|
|
|
|
2021-02-25 13:02:33 +00:00
|
|
|
for( PCB_LAYER_ID layer : m_settings.m_LayerSet.Seq() )
|
2020-08-30 21:20:37 +00:00
|
|
|
{
|
2021-02-25 13:02:33 +00:00
|
|
|
aView.SetLayerVisible( PCBNEW_LAYER_ID_START + layer, true );
|
2018-09-28 08:10:08 +00:00
|
|
|
|
2021-05-19 08:05:49 +00:00
|
|
|
// Enable the corresponding zone layer (copper layers and other layers)
|
|
|
|
aView.SetLayerVisible( LAYER_ZONE_START + layer, true );
|
2020-08-30 21:20:37 +00:00
|
|
|
}
|
|
|
|
|
2021-02-25 13:02:33 +00:00
|
|
|
RENDER_SETTINGS* renderSettings = aView.GetPainter()->GetSettings();
|
2021-08-24 08:27:53 +00:00
|
|
|
// A color to do not print objects on some layers, when the layer must be enabled
|
|
|
|
// to print some other objects
|
2022-03-01 17:26:41 +00:00
|
|
|
COLOR4D invisible_color = COLOR4D::UNSPECIFIED;
|
2021-02-25 13:02:33 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
if( m_pcbnewSettings.m_AsItemCheckboxes )
|
2020-08-11 19:41:01 +00:00
|
|
|
{
|
2020-10-19 22:14:46 +00:00
|
|
|
auto setVisibility =
|
|
|
|
[&]( GAL_LAYER_ID aLayer )
|
|
|
|
{
|
|
|
|
if( m_board->IsElementVisible( aLayer ) )
|
2021-02-25 13:02:33 +00:00
|
|
|
aView.SetLayerVisible( aLayer, true );
|
|
|
|
else
|
2021-08-24 08:27:53 +00:00
|
|
|
renderSettings->SetLayerColor( aLayer, invisible_color );
|
2020-10-19 22:14:46 +00:00
|
|
|
};
|
2020-08-11 19:41:01 +00:00
|
|
|
|
|
|
|
setVisibility( LAYER_MOD_FR );
|
|
|
|
setVisibility( LAYER_MOD_BK );
|
|
|
|
setVisibility( LAYER_MOD_VALUES );
|
|
|
|
setVisibility( LAYER_MOD_REFERENCES );
|
2021-10-22 20:12:57 +00:00
|
|
|
setVisibility( LAYER_MOD_TEXT );
|
2020-08-11 19:41:01 +00:00
|
|
|
setVisibility( LAYER_MOD_TEXT_INVISIBLE );
|
2021-06-25 09:35:17 +00:00
|
|
|
setVisibility( LAYER_PADS );
|
2020-08-11 19:41:01 +00:00
|
|
|
setVisibility( LAYER_PAD_FR );
|
|
|
|
setVisibility( LAYER_PAD_BK );
|
|
|
|
setVisibility( LAYER_PADS_TH );
|
|
|
|
|
|
|
|
setVisibility( LAYER_TRACKS );
|
2020-08-24 12:59:58 +00:00
|
|
|
setVisibility( LAYER_VIAS );
|
2021-06-25 09:35:17 +00:00
|
|
|
setVisibility( LAYER_VIA_MICROVIA );
|
|
|
|
setVisibility( LAYER_VIA_BBLIND );
|
|
|
|
setVisibility( LAYER_VIA_THROUGH );
|
|
|
|
setVisibility( LAYER_ZONES );
|
2020-08-11 19:41:01 +00:00
|
|
|
|
|
|
|
setVisibility( LAYER_DRC_WARNING );
|
|
|
|
setVisibility( LAYER_DRC_ERROR );
|
|
|
|
setVisibility( LAYER_DRC_EXCLUSION );
|
|
|
|
setVisibility( LAYER_ANCHOR );
|
2021-02-22 16:37:43 +00:00
|
|
|
setVisibility( LAYER_DRAWINGSHEET );
|
2020-08-11 19:41:01 +00:00
|
|
|
setVisibility( LAYER_GRID );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-08-24 08:27:53 +00:00
|
|
|
// Draw layers that must be not visible on printing are set to an invisible layer
|
|
|
|
// LAYER_PAD_FR, LAYER_PAD_BK and LAYER_PADS_TH must be enabled to print pads on
|
|
|
|
// technical layers, but not the pad on copper layer(s) if they are not enabled
|
2018-09-28 08:10:08 +00:00
|
|
|
|
2021-08-24 08:27:53 +00:00
|
|
|
if( !aLayerSet.test( F_Cu ) )
|
|
|
|
renderSettings->SetLayerColor( LAYER_PAD_FR, invisible_color );
|
|
|
|
|
|
|
|
if( !aLayerSet.test( B_Cu ) )
|
|
|
|
renderSettings->SetLayerColor( LAYER_PAD_BK, invisible_color );
|
2018-09-28 08:10:08 +00:00
|
|
|
|
2021-02-25 13:02:33 +00:00
|
|
|
// Enable items on copper layers, but do not draw holes
|
2022-04-26 19:53:24 +00:00
|
|
|
for( GAL_LAYER_ID layer : { LAYER_PADS_TH, LAYER_VIA_THROUGH, LAYER_VIA_MICROVIA, LAYER_VIA_BBLIND } )
|
2018-09-28 21:45:48 +00:00
|
|
|
{
|
2021-02-25 13:02:33 +00:00
|
|
|
if( ( aLayerSet & LSET::AllCuMask() ).any() ) // Items visible on any copper layer
|
|
|
|
aView.SetLayerVisible( layer, true );
|
|
|
|
else
|
2021-08-24 08:27:53 +00:00
|
|
|
renderSettings->SetLayerColor( layer, invisible_color );
|
2018-09-28 21:45:48 +00:00
|
|
|
}
|
2018-09-28 08:10:08 +00:00
|
|
|
|
2020-08-11 19:41:01 +00:00
|
|
|
// Keep certain items always enabled/disabled and just rely on the layer visibility
|
2021-08-24 08:27:53 +00:00
|
|
|
// Note LAYER_PAD_FR, LAYER_PAD_BK, LAYER_PADS_TH are enabled here because paths must
|
|
|
|
// be drawn on some other (technical) layers.
|
2020-10-19 22:14:46 +00:00
|
|
|
const int alwaysEnabled[] =
|
|
|
|
{
|
2021-10-22 20:12:57 +00:00
|
|
|
LAYER_MOD_TEXT, LAYER_MOD_FR, LAYER_MOD_BK,
|
2020-10-19 22:14:46 +00:00
|
|
|
LAYER_MOD_VALUES, LAYER_MOD_REFERENCES, LAYER_TRACKS, LAYER_ZONES, LAYER_PADS,
|
2022-04-26 19:53:24 +00:00
|
|
|
LAYER_VIAS,
|
2021-08-24 08:27:53 +00:00
|
|
|
LAYER_PAD_FR, LAYER_PAD_BK, LAYER_PADS_TH
|
2020-10-19 22:14:46 +00:00
|
|
|
};
|
2018-09-28 08:10:08 +00:00
|
|
|
|
2021-02-25 13:02:33 +00:00
|
|
|
for( int layer : alwaysEnabled )
|
|
|
|
aView.SetLayerVisible( layer, true );
|
2020-08-11 19:41:01 +00:00
|
|
|
}
|
2020-10-19 22:14:46 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
if( m_pcbnewSettings.m_DrillMarks != PCBNEW_PRINTOUT_SETTINGS::NO_DRILL_SHAPE )
|
2020-10-19 22:14:46 +00:00
|
|
|
{
|
|
|
|
// Enable hole layers to draw drill marks
|
2021-02-25 13:02:33 +00:00
|
|
|
for( int layer : { LAYER_PAD_PLATEDHOLES, LAYER_NON_PLATEDHOLES, LAYER_VIA_HOLES } )
|
2020-10-19 22:14:46 +00:00
|
|
|
{
|
2021-02-25 13:02:33 +00:00
|
|
|
aView.SetLayerVisible( layer, true );
|
|
|
|
aView.SetTopLayer( layer, true );
|
2020-10-19 22:14:46 +00:00
|
|
|
}
|
|
|
|
}
|
2018-09-28 08:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-17 11:56:07 +00:00
|
|
|
void PCBNEW_PRINTOUT::setupPainter( KIGFX::PAINTER& aPainter )
|
2018-09-28 21:45:48 +00:00
|
|
|
{
|
|
|
|
BOARD_PRINTOUT::setupPainter( aPainter );
|
|
|
|
|
2020-01-17 11:56:07 +00:00
|
|
|
KIGFX::PCB_PRINT_PAINTER& painter = dynamic_cast<KIGFX::PCB_PRINT_PAINTER&>( aPainter );
|
2018-09-28 21:45:48 +00:00
|
|
|
|
2021-04-16 12:12:55 +00:00
|
|
|
switch( m_pcbnewSettings.m_DrillMarks )
|
2018-09-28 21:45:48 +00:00
|
|
|
{
|
2020-10-19 22:14:46 +00:00
|
|
|
case PCBNEW_PRINTOUT_SETTINGS::NO_DRILL_SHAPE:
|
|
|
|
painter.SetDrillMarks( false, 0 );
|
|
|
|
break;
|
2018-09-28 21:45:48 +00:00
|
|
|
|
2020-10-19 22:14:46 +00:00
|
|
|
case PCBNEW_PRINTOUT_SETTINGS::SMALL_DRILL_SHAPE:
|
2022-09-16 11:33:56 +00:00
|
|
|
painter.SetDrillMarks( false, pcbIUScale.mmToIU( ADVANCED_CFG::GetCfg().m_SmallDrillMarkSize ) );
|
2018-09-28 21:45:48 +00:00
|
|
|
|
2021-01-30 14:41:31 +00:00
|
|
|
painter.GetSettings()->SetLayerColor( LAYER_PAD_PLATEDHOLES, COLOR4D::BLACK );
|
2020-10-19 22:14:46 +00:00
|
|
|
painter.GetSettings()->SetLayerColor( LAYER_NON_PLATEDHOLES, COLOR4D::BLACK );
|
2021-01-30 14:41:31 +00:00
|
|
|
painter.GetSettings()->SetLayerColor( LAYER_VIA_HOLES, COLOR4D::BLACK );
|
2020-10-19 22:14:46 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PCBNEW_PRINTOUT_SETTINGS::FULL_DRILL_SHAPE:
|
|
|
|
painter.SetDrillMarks( true );
|
|
|
|
|
2021-01-30 14:41:31 +00:00
|
|
|
painter.GetSettings()->SetLayerColor( LAYER_PAD_PLATEDHOLES, COLOR4D::BLACK );
|
2020-10-19 22:14:46 +00:00
|
|
|
painter.GetSettings()->SetLayerColor( LAYER_NON_PLATEDHOLES, COLOR4D::BLACK );
|
2021-01-30 14:41:31 +00:00
|
|
|
painter.GetSettings()->SetLayerColor( LAYER_VIA_HOLES, COLOR4D::BLACK );
|
2020-10-19 22:14:46 +00:00
|
|
|
break;
|
2018-09-28 21:45:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-29 10:13:06 +00:00
|
|
|
void PCBNEW_PRINTOUT::setupGal( KIGFX::GAL* aGal )
|
|
|
|
{
|
2018-10-05 14:41:17 +00:00
|
|
|
BOARD_PRINTOUT::setupGal( aGal );
|
2022-09-17 00:45:14 +00:00
|
|
|
aGal->SetWorldUnitLength( 0.001/pcbIUScale.IU_PER_MM /* 1 nm */ / 0.0254 /* 1 inch in meters */ );
|
2018-09-29 10:13:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-08-30 23:28:18 +00:00
|
|
|
BOX2I PCBNEW_PRINTOUT::getBoundingBox()
|
2018-09-19 13:06:29 +00:00
|
|
|
{
|
|
|
|
return m_board->ComputeBoundingBox();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::unique_ptr<KIGFX::PAINTER> PCBNEW_PRINTOUT::getPainter( KIGFX::GAL* aGal )
|
|
|
|
{
|
2020-10-26 23:49:11 +00:00
|
|
|
return std::make_unique<KIGFX::PCB_PRINT_PAINTER>( aGal );
|
2018-09-28 21:45:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-24 00:38:33 +00:00
|
|
|
KIGFX::PCB_PRINT_PAINTER::PCB_PRINT_PAINTER( GAL* aGal ) :
|
2022-07-24 22:40:47 +00:00
|
|
|
PCB_PAINTER( aGal, FRAME_PCB_EDITOR ),
|
2020-12-24 00:38:33 +00:00
|
|
|
m_drillMarkReal( false ),
|
|
|
|
m_drillMarkSize( 0 )
|
2021-12-26 00:36:12 +00:00
|
|
|
{ }
|
2018-10-08 13:50:59 +00:00
|
|
|
|
|
|
|
|
2020-11-12 22:30:02 +00:00
|
|
|
int KIGFX::PCB_PRINT_PAINTER::getDrillShape( const PAD* aPad ) const
|
2018-09-28 21:45:48 +00:00
|
|
|
{
|
|
|
|
return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillShape( aPad ) : PAD_DRILL_SHAPE_CIRCLE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-12 22:30:02 +00:00
|
|
|
VECTOR2D KIGFX::PCB_PRINT_PAINTER::getDrillSize( const PAD* aPad ) const
|
2018-09-28 21:45:48 +00:00
|
|
|
{
|
2022-10-21 17:41:21 +00:00
|
|
|
return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillSize( aPad )
|
|
|
|
: VECTOR2D( m_drillMarkSize, m_drillMarkSize );
|
2018-09-28 21:45:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-06-11 21:07:02 +00:00
|
|
|
int KIGFX::PCB_PRINT_PAINTER::getDrillSize( const PCB_VIA* aVia ) const
|
2018-09-28 21:45:48 +00:00
|
|
|
{
|
|
|
|
return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillSize( aVia ) : m_drillMarkSize;
|
2018-09-19 13:06:29 +00:00
|
|
|
}
|