the codes below draws an arc in xGauges. I am trying to find ways to make the arc scroll (Draws) smoothly. I have failed on many attempts which the codes are not shown. For example, the needle can be scrolled smoothly using pnl.SetRotationAnimated but cannot figure out this DrawArc routine.
Private Sub DrawArc(CenterX As Int, CenterY As Int, Radius As Int, StartAngle As Int, SweepAngle As Int, Color As Int, Strokewidth As Int) Private Angle, x1, y1, x2, y2 As Float Private i As Int Angle = StartAngle x1 = CenterX + Radius * CosD(Angle) y1 = CenterY + Radius * SinD(Angle) For i = StartAngle + 1 To StartAngle + SweepAngle Angle = Angle + 1 x2 = CenterX + Radius * CosD(Angle) y2 = CenterY + Radius * SinD(Angle) cvsGauge.DrawLine(x1, y1, x2, y2, Color, Strokewidth) x1 = x2 y1 = y2 Next End Sub