Caps for lines are drawn only when segments are wider than 1.0

This commit is contained in:
Maciej Suminski 2013-09-13 15:30:45 +02:00
parent 4c2e3b9a59
commit 782867f7b3
1 changed files with 5 additions and 2 deletions

View File

@ -233,8 +233,11 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin
drawLineQuad( aStartPoint, aEndPoint ); drawLineQuad( aStartPoint, aEndPoint );
// Line caps // Line caps
drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); if( lineWidth > 1.0 )
drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); {
drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 );
drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 );
}
} }