Increase visibility of polygon preview

This set the polygon preview item to wider size and adjusts the draw
order to ensure it remains visible even when antialiasing
This commit is contained in:
Seth Hillbrand 2019-10-23 22:00:01 -07:00
parent df3fabfa21
commit ea1c8525ce
2 changed files with 6 additions and 1 deletions

View File

@ -31,6 +31,7 @@
using namespace KIGFX::PREVIEW;
const double POLYGON_ITEM::POLY_LINE_WIDTH = 150000.0;
POLYGON_ITEM::POLYGON_ITEM():
SIMPLE_OVERLAY_ITEM()
@ -60,12 +61,14 @@ void POLYGON_ITEM::drawPreviewShape( KIGFX::VIEW* aView ) const
auto& gal = *aView->GetGAL();
auto rs = aView->GetPainter()->GetSettings();
gal.SetLineWidth( POLY_LINE_WIDTH );
gal.DrawPolyline( m_lockedChain );
gal.DrawPolygon( m_polyfill );
// draw the leader line in a different color
gal.SetStrokeColor( rs->GetLayerColor( LAYER_AUX_ITEMS ) );
gal.DrawPolyline( m_leaderChain );
gal.DrawPolygon( m_polyfill );
}

View File

@ -75,6 +75,8 @@ private:
///> polygon fill
SHAPE_POLY_SET m_polyfill;
static const double POLY_LINE_WIDTH;
};
} // PREVIEW