Opengl gal: Fix bug: segments with 0 length are not drawn. However the are equivalent to circles.
Using 0 length segments happen with oval pads having the same X and Y size, and in some other cases. Fixes: lp:1801923 https://bugs.launchpad.net/kicad/+bug/1801923
This commit is contained in:
parent
1f3d5cee0e
commit
ffe4b745dd
|
@ -564,6 +564,12 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin
|
|||
void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
|
||||
double aWidth )
|
||||
{
|
||||
if( aStartPoint == aEndPoint ) // 0 length segments are just a circle.
|
||||
{
|
||||
DrawCircle( aStartPoint, aWidth/2 );
|
||||
return;
|
||||
}
|
||||
|
||||
if( isFillEnabled || aWidth == 1.0 )
|
||||
{
|
||||
currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a );
|
||||
|
|
|
@ -423,13 +423,7 @@ void GERBVIEW_PAINTER::drawFlashedShape( GERBER_DRAW_ITEM* aItem, bool aFilled )
|
|||
int radius = code->m_Size.x >> 1;
|
||||
VECTOR2D start( aItem->GetABPosition( aItem->m_Start ) );
|
||||
|
||||
if( !aFilled )
|
||||
{
|
||||
m_gal->DrawCircle( start, radius );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( code->m_DrillShape == APT_DEF_NO_HOLE )
|
||||
if( !aFilled || code->m_DrillShape == APT_DEF_NO_HOLE )
|
||||
{
|
||||
m_gal->DrawCircle( start, radius );
|
||||
}
|
||||
|
@ -443,7 +437,7 @@ void GERBVIEW_PAINTER::drawFlashedShape( GERBER_DRAW_ITEM* aItem, bool aFilled )
|
|||
|
||||
drawPolygon( aItem, poly, aFilled );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue