Disable zone outlines and hatched lines rendering in printouts

This commit is contained in:
Maciej Suminski 2018-10-08 15:50:59 +02:00
parent 42c5fc0ef8
commit 262a105416
4 changed files with 24 additions and 7 deletions

View File

@ -51,6 +51,8 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS()
m_padNumbers = true;
m_netNamesOnPads = true;
m_netNamesOnTracks = true;
m_netNamesOnVias = true;
m_zoneOutlines = true;
m_displayZone = DZ_SHOW_FILLED;
m_clearance = CL_NONE;
m_sketchBoardGfx = false;
@ -1108,7 +1110,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone, int aLayer )
// Draw the outline
const SHAPE_POLY_SET* outline = aZone->Outline();
if( outline )
if( m_pcbSettings.m_zoneOutlines && outline )
{
m_gal->SetStrokeColor( color );
m_gal->SetIsFill( false );
@ -1130,7 +1132,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone, int aLayer )
int holes_count = outline->HoleCount( 0 );
for( int ii = 0; ii < holes_count; ++ii )
m_gal->DrawPolyline( outline->CHole( 0, ii ) );
m_gal->DrawPolyline( outline->CHole( 0, ii ) );
// Draw hatch lines
for( const SEG& hatchLine : aZone->GetHatchLines() )

View File

@ -136,6 +136,14 @@ public:
m_sketchBoardGfx = aEnabled;
}
/**
* Turns on/off drawing outline and hatched lines for zones.
*/
void EnableZoneOutlines( bool aEnabled )
{
m_zoneOutlines = aEnabled;
}
inline bool IsBackgroundDark() const override
{
auto luma = m_layerColors[ LAYER_PCB_BACKGROUND ].GetBrightness();
@ -177,7 +185,10 @@ protected:
bool m_netNamesOnTracks;
///> Flag determining if net names should be visible for vias
bool m_netNamesOnVias = true;
bool m_netNamesOnVias;
///> Flag determining if zones should have outlines drawn
bool m_zoneOutlines;
///> Maximum font size for netnames (and other dynamically shown strings)
static const double MAX_FONT_SIZE;

View File

@ -210,6 +210,13 @@ std::unique_ptr<KIGFX::PAINTER> PCBNEW_PRINTOUT::getPainter( KIGFX::GAL* aGal )
}
KIGFX::PCB_PRINT_PAINTER::PCB_PRINT_PAINTER( GAL* aGal )
: PCB_PAINTER( aGal ), m_drillMarkReal( false ), m_drillMarkSize( 0 )
{
m_pcbSettings.EnableZoneOutlines( false );
}
int KIGFX::PCB_PRINT_PAINTER::getDrillShape( const D_PAD* aPad ) const
{
return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillShape( aPad ) : PAD_DRILL_SHAPE_CIRCLE;

View File

@ -83,10 +83,7 @@ namespace KIGFX {
class PCB_PRINT_PAINTER : public PCB_PAINTER
{
public:
PCB_PRINT_PAINTER( GAL* aGal )
: PCB_PAINTER( aGal ), m_drillMarkReal( false ), m_drillMarkSize( 0 )
{
}
PCB_PRINT_PAINTER( GAL* aGal );
/**
* Set drill marks visibility and options.