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:
parent
df3fabfa21
commit
ea1c8525ce
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
using namespace KIGFX::PREVIEW;
|
using namespace KIGFX::PREVIEW;
|
||||||
|
|
||||||
|
const double POLYGON_ITEM::POLY_LINE_WIDTH = 150000.0;
|
||||||
|
|
||||||
POLYGON_ITEM::POLYGON_ITEM():
|
POLYGON_ITEM::POLYGON_ITEM():
|
||||||
SIMPLE_OVERLAY_ITEM()
|
SIMPLE_OVERLAY_ITEM()
|
||||||
|
@ -60,12 +61,14 @@ void POLYGON_ITEM::drawPreviewShape( KIGFX::VIEW* aView ) const
|
||||||
auto& gal = *aView->GetGAL();
|
auto& gal = *aView->GetGAL();
|
||||||
auto rs = aView->GetPainter()->GetSettings();
|
auto rs = aView->GetPainter()->GetSettings();
|
||||||
|
|
||||||
|
gal.SetLineWidth( POLY_LINE_WIDTH );
|
||||||
gal.DrawPolyline( m_lockedChain );
|
gal.DrawPolyline( m_lockedChain );
|
||||||
gal.DrawPolygon( m_polyfill );
|
|
||||||
|
|
||||||
// draw the leader line in a different color
|
// draw the leader line in a different color
|
||||||
gal.SetStrokeColor( rs->GetLayerColor( LAYER_AUX_ITEMS ) );
|
gal.SetStrokeColor( rs->GetLayerColor( LAYER_AUX_ITEMS ) );
|
||||||
gal.DrawPolyline( m_leaderChain );
|
gal.DrawPolyline( m_leaderChain );
|
||||||
|
|
||||||
|
gal.DrawPolygon( m_polyfill );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,8 @@ private:
|
||||||
|
|
||||||
///> polygon fill
|
///> polygon fill
|
||||||
SHAPE_POLY_SET m_polyfill;
|
SHAPE_POLY_SET m_polyfill;
|
||||||
|
|
||||||
|
static const double POLY_LINE_WIDTH;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // PREVIEW
|
} // PREVIEW
|
||||||
|
|
Loading…
Reference in New Issue