OPENGL_GAL: ensure 0 sized rect with thickness is shown (already shown by Cairo)
Fixes #15850 https://gitlab.com/kicad/code/kicad/-/issues/15850
This commit is contained in:
parent
d8f35633d4
commit
42384bcbd0
|
@ -1121,7 +1121,14 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn
|
||||||
m_currentManager->Color( m_strokeColor.r, m_strokeColor.g, m_strokeColor.b,
|
m_currentManager->Color( m_strokeColor.r, m_strokeColor.g, m_strokeColor.b,
|
||||||
m_strokeColor.a );
|
m_strokeColor.a );
|
||||||
|
|
||||||
|
// DrawLine (and DrawPolyline )
|
||||||
|
// has problem with 0 length lines so enforce minimum
|
||||||
|
if( aStartPoint == aEndPoint )
|
||||||
|
DrawLine( aStartPoint + VECTOR2D( 1.0, 0.0 ), aEndPoint );
|
||||||
|
else
|
||||||
|
{
|
||||||
std::deque<VECTOR2D> pointList;
|
std::deque<VECTOR2D> pointList;
|
||||||
|
|
||||||
pointList.push_back( aStartPoint );
|
pointList.push_back( aStartPoint );
|
||||||
pointList.push_back( diagonalPointA );
|
pointList.push_back( diagonalPointA );
|
||||||
pointList.push_back( aEndPoint );
|
pointList.push_back( aEndPoint );
|
||||||
|
@ -1129,6 +1136,7 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn
|
||||||
pointList.push_back( aStartPoint );
|
pointList.push_back( aStartPoint );
|
||||||
DrawPolyline( pointList );
|
DrawPolyline( pointList );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue