Commit 0f5aa063 authored by Maciej Suminski's avatar Maciej Suminski

Fixed stroke semicircles drawing using shaderless OpenGL backend.

parent 6dc79cf1
......@@ -1024,15 +1024,11 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa
else
{
// Compute the factors for the unit circle
double outerScale = lineWidth / aRadius / 2;
double innerScale = -outerScale;
outerScale += 1.0;
innerScale += 1.0;
double innerScale = 1.0 - lineWidth / aRadius;
if( innerScale < outerScale )
{
Save();
Translate( aCenterPoint );
Scale( VECTOR2D( aRadius, aRadius ) );
Rotate( aAngle );
// Draw the outline
......@@ -1062,11 +1058,11 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa
}
vertex3( circle[i].x * innerScale, circle[i].y * innerScale, layerDepth );
vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth );
vertex3( circle[i].x, circle[i].y, layerDepth );
vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth );
vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth );
vertex3( circle[next].x * outerScale, circle[next].y * outerScale, layerDepth );
vertex3( circle[i].x, circle[i].y, layerDepth );
vertex3( circle[next].x, circle[next].y, layerDepth );
vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth );
}
......@@ -1074,7 +1070,6 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa
Restore();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment