With this Code:
comes the following behavior:
Every time a button enters the top point, the direction of the line is changed, how to prevent this?
Example Project is attached.
Line 157-170
B4X:
Dim p As B4XPath
Dim angle1 As Int = (mValue1 - mMin) / (mMax - mMin) * 360
Dim angle2 As Int = (mValue2 - mMin) / (mMax - mMin) * 360
If TouchedPanel1 = True Then
p.InitializeArc(CircleRect.CenterX, CircleRect.CenterY, mBase.Width/2, angle2-90,angle1-angle2)
Else
p.InitializeArc(CircleRect.CenterX, CircleRect.CenterY, mBase.Width/2, angle1-90,angle2-angle1)
End If
cvs.DrawPath(p, mReachedColor, True, 40dip)
Every time a button enters the top point, the direction of the line is changed, how to prevent this?
Example Project is attached.
Line 157-170