Having a problem in drawing a 180degree arc (changing color after 90 Degrees) - The issue is the Arc's Horizontal and Vertical lines are not straight.
I know the start and Sweep angles are correct 180, 90 and 270, 90
Any help is aspirated.
my Code is....
Private Sub drawArc(ByVal g As Graphics)
Dim a = valueRange / 2
drawArcSegment(g, minValue, a, optimumRangeColor)
drawArcSegment(g, a, maxValue, actionRangeColor)End Sub
Sub drawArcSegment(ByVal g As Graphics, ByVal startValue As Double, ByVal EndValue As Double, ByVal segmentColor As Color)
' Set The Rectanglefor the Arc Segment
Dim rect As New Rectangle(boarder + arcWidth2, arcCenter.Y - arcRadius, arcDiameter, arcDiameter)
' Set The Color of the Arc Segment
Dim arcColor As New SolidBrush(segmentColor)
Dim arcPen As New Pen(arcColor, arcWidth)
' Calulate the Start and Sweep Angle of the Arc Segment
Dim startAngle As Single = (startValue * valueAngle) + 180
Dim sweepAngle As Single = ((EndValue * valueAngle) + 180) - startAngle
' Draw Arc Segment
g.DrawArc(arcPen, rect, startAngle, sweepAngle)
End Sub