Draw zone hatching in GAL
This just uses the same hatch lines that are built into the zone as legacy. They are always drawn, even when there is a fill, as if the fill doesn't reach the corners, the hatches can be seen. Fixes: lp:1487043 * https://bugs.launchpad.net/kicad/+bug/1487043
This commit is contained in:
parent
64d6c3f91c
commit
796f3219d0
|
@ -966,6 +966,12 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone )
|
||||||
m_gal->DrawPolyline( corners );
|
m_gal->DrawPolyline( corners );
|
||||||
corners.clear();
|
corners.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for( unsigned ic = 0; ic < polygon->m_HatchLines.size(); ic++ )
|
||||||
|
{
|
||||||
|
auto& hatchLine = polygon->m_HatchLines[ic];
|
||||||
|
m_gal->DrawLine( hatchLine.m_Start, hatchLine.m_End );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the filling
|
// Draw the filling
|
||||||
|
|
|
@ -1440,6 +1440,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout, ZONE_MODE aMode )
|
||||||
|
|
||||||
zone->Outline()->CloseLastContour();
|
zone->Outline()->CloseLastContour();
|
||||||
zone->Outline()->RemoveNullSegments();
|
zone->Outline()->RemoveNullSegments();
|
||||||
|
zone->Outline()->Hatch();
|
||||||
|
|
||||||
if( !aKeepout )
|
if( !aKeepout )
|
||||||
static_cast<PCB_EDIT_FRAME*>( m_frame )->Fill_Zone( zone.get() );
|
static_cast<PCB_EDIT_FRAME*>( m_frame )->Fill_Zone( zone.get() );
|
||||||
|
|
|
@ -469,6 +469,8 @@ void POINT_EDITOR::updateItem() const
|
||||||
outline->SetY( i, point.y );
|
outline->SetY( i, point.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outline->Hatch();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
#include <wxPcbStruct.h>
|
#include <wxPcbStruct.h>
|
||||||
#include <board_commit.h>
|
#include <board_commit.h>
|
||||||
|
#include <view/view.h>
|
||||||
|
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
#include <class_zone.h>
|
#include <class_zone.h>
|
||||||
|
@ -854,7 +855,6 @@ static void Show_New_Edge_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||||
zone->DrawWhileCreateOutline( aPanel, aDC );
|
zone->DrawWhileCreateOutline( aPanel, aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
||||||
{
|
{
|
||||||
ZONE_EDIT_T edited;
|
ZONE_EDIT_T edited;
|
||||||
|
@ -914,6 +914,11 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
||||||
{
|
{
|
||||||
ZONE_CONTAINER* edge_zone = GetBoard()->GetArea( ii );
|
ZONE_CONTAINER* edge_zone = GetBoard()->GetArea( ii );
|
||||||
edge_zone->Draw( m_canvas, DC, GR_XOR );
|
edge_zone->Draw( m_canvas, DC, GR_XOR );
|
||||||
|
|
||||||
|
if( IsGalCanvasActive() )
|
||||||
|
{
|
||||||
|
GetGalCanvas()->GetView()->Update( edge_zone );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
zoneInfo.ExportSetting( *aZone );
|
zoneInfo.ExportSetting( *aZone );
|
||||||
|
@ -929,6 +934,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
||||||
// Redraw the real new zone outlines
|
// Redraw the real new zone outlines
|
||||||
GetBoard()->RedrawAreasOutlines( m_canvas, DC, GR_OR, UNDEFINED_LAYER );
|
GetBoard()->RedrawAreasOutlines( m_canvas, DC, GR_OR, UNDEFINED_LAYER );
|
||||||
|
|
||||||
|
|
||||||
UpdateCopyOfZonesList( s_PickedList, s_AuxiliaryList, GetBoard() );
|
UpdateCopyOfZonesList( s_PickedList, s_AuxiliaryList, GetBoard() );
|
||||||
commit.Stage( s_PickedList );
|
commit.Stage( s_PickedList );
|
||||||
commit.Push( _( "Modify zone properties" ) );
|
commit.Push( _( "Modify zone properties" ) );
|
||||||
|
|
Loading…
Reference in New Issue