Draw degenerate lines as points
Rather than not drawing, which will miss some imported elements that should be visible due to the line width, we draw a zero-length line that appears as a point.
This commit is contained in:
parent
c7c4439027
commit
5be0ddca27
|
@ -2181,10 +2181,16 @@ void OPENGL_GAL::drawPolygon( GLdouble* aPoints, int aPointCount )
|
|||
void OPENGL_GAL::drawPolyline( const std::function<VECTOR2D( int )>& aPointGetter, int aPointCount,
|
||||
bool aReserve )
|
||||
{
|
||||
wxCHECK( aPointCount >= 2, /* return */ );
|
||||
wxCHECK( aPointCount > 0, /* return */ );
|
||||
|
||||
m_currentManager->Color( m_strokeColor.r, m_strokeColor.g, m_strokeColor.b, m_strokeColor.a );
|
||||
|
||||
if( aPointCount == 1 )
|
||||
{
|
||||
drawLineQuad( aPointGetter( 0 ), aPointGetter( 0 ), false );
|
||||
return;
|
||||
}
|
||||
|
||||
if( aReserve )
|
||||
{
|
||||
reserveLineQuads( aPointCount - 1 );
|
||||
|
|
Loading…
Reference in New Issue