B4X:

```
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
```