Bug fixes for printing vias.
Blind/buried and microvias didn't get their layers trimmed properly,
nor did through vias with dropped pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/11851
(cherry picked from commit 231ac567b8
)
This commit is contained in:
parent
0321d96b1e
commit
2fdddb970f
|
@ -136,6 +136,7 @@ void BOARD_PRINTOUT::DrawPage( const wxString& aLayerName, int aPageNum, int aPa
|
|||
|
||||
setupPainter( *painter );
|
||||
setupViewLayers( *view, m_settings.m_LayerSet );
|
||||
dstSettings->SetPrintLayers( m_settings.m_LayerSet );
|
||||
|
||||
dstSettings->SetLayerName( aLayerName );
|
||||
|
||||
|
|
|
@ -115,6 +115,9 @@ public:
|
|||
const wxString& GetLayerName() const { return m_layerName; }
|
||||
void SetLayerName( const wxString& aLayerName ) { m_layerName = aLayerName; }
|
||||
|
||||
LSET GetPrintLayers() const { return m_printLayers; }
|
||||
void SetPrintLayers( LSET aLayerSet ) { m_printLayers = aLayerSet; }
|
||||
|
||||
/**
|
||||
* Clear the list of active layers.
|
||||
*/
|
||||
|
@ -315,6 +318,7 @@ protected:
|
|||
// lines. This sets an absolute minimum.
|
||||
bool m_showPageLimits;
|
||||
bool m_isPrinting;
|
||||
LSET m_printLayers;
|
||||
|
||||
wxDC* m_printDC; // This can go away once the drawing sheet is moved to
|
||||
// Cairo-based printing.
|
||||
|
|
|
@ -847,9 +847,23 @@ void PCB_PAINTER::draw( const PCB_VIA* aVia, int aLayer )
|
|||
{
|
||||
m_gal->DrawCircle( center, getDrillSize( aVia ) / 2.0 );
|
||||
}
|
||||
else if( aLayer == LAYER_VIA_THROUGH || m_pcbSettings.GetDrawIndividualViaLayers() )
|
||||
else if( aLayer == LAYER_VIA_THROUGH || m_pcbSettings.IsPrinting() )
|
||||
{
|
||||
m_gal->DrawCircle( center, aVia->GetWidth() / 2.0 );
|
||||
int annular_width = ( aVia->GetWidth() - getDrillSize( aVia ) ) / 2.0;
|
||||
double radius = aVia->GetWidth() / 2.0;
|
||||
bool draw = aLayer == LAYER_VIA_THROUGH;
|
||||
|
||||
if( m_pcbSettings.IsPrinting() )
|
||||
draw = aVia->FlashLayer( m_pcbSettings.GetPrintLayers() );
|
||||
|
||||
if( !sketchMode )
|
||||
{
|
||||
m_gal->SetLineWidth( annular_width );
|
||||
radius -= annular_width / 2.0;
|
||||
}
|
||||
|
||||
if( draw )
|
||||
m_gal->DrawCircle( center, radius );
|
||||
}
|
||||
else if( aLayer == LAYER_VIA_BBLIND || aLayer == LAYER_VIA_MICROVIA )
|
||||
{
|
||||
|
|
|
@ -171,9 +171,6 @@ public:
|
|||
|
||||
inline bool GetGlobalRatsnestLinesEnabled() const { return m_globalRatsnestlines; }
|
||||
|
||||
bool GetDrawIndividualViaLayers() const { return m_drawIndividualViaLayers; }
|
||||
void SetDrawIndividualViaLayers( bool aFlag ) { m_drawIndividualViaLayers = aFlag; }
|
||||
|
||||
NET_COLOR_MODE GetNetColorMode() const { return m_netColorMode; }
|
||||
void SetNetColorMode( NET_COLOR_MODE aMode ) { m_netColorMode = aMode; }
|
||||
|
||||
|
@ -207,8 +204,6 @@ protected:
|
|||
bool m_curvedRatsnestlines = true;
|
||||
bool m_globalRatsnestlines = true;
|
||||
|
||||
bool m_drawIndividualViaLayers = false;
|
||||
|
||||
ZONE_DISPLAY_MODE m_zoneDisplayMode;
|
||||
HIGH_CONTRAST_MODE m_contrastModeDisplay;
|
||||
RATSNEST_MODE m_ratsnestDisplayMode;
|
||||
|
|
|
@ -260,9 +260,6 @@ void PCBNEW_PRINTOUT::setupPainter( KIGFX::PAINTER& aPainter )
|
|||
painter.GetSettings()->SetLayerColor( LAYER_VIA_HOLES, COLOR4D::BLACK );
|
||||
break;
|
||||
}
|
||||
|
||||
painter.GetSettings()->SetDrawIndividualViaLayers(
|
||||
m_pcbnewSettings.m_Pagination == PCBNEW_PRINTOUT_SETTINGS::LAYER_PER_PAGE );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue