Private Sub DrawLineWithArrows(cvs As B4XCanvas, xb, yb, xe, ye, ArrowLength As Int, HalfArrowWidth As Int, Color As Int, BeginArrow As Boolean, EndArrow As Boolean)
Private Angle As Double
cvs.DrawLine(xb, yb, xe, ye, Color, 1dip)
If BeginArrow Then
Angle = ATan2(yb - ye, xb - xe)
DrawArrow(cvs, xb, yb, Angle, ArrowLength, HalfArrowWidth, Color)
End If
If EndArrow Then
Angle = ATan2(ye - yb, xe - xb)
DrawArrow(cvs, xe, ye, Angle, ArrowLength, HalfArrowWidth, Color)
End If
End Sub