Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Dim cvsCanvas As B4XCanvas
End Sub
Public Sub Initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
cvsCanvas.Initialize(Root)
drawCurve(5.0, 1.8)
End Sub
Sub drawCurve(XStep As Float, YFactor As Float)
Dim path As B4XPath
path.Initialize(0, 0)
Dim x As Float = 0.0
Dim y As Float = Root.Height
Do While (y > 0.001)
x = x + XStep
y = y - (y / YFactor)
path.LineTo(x, Root.height - y)
Loop
path.LineTo(0, Root.Height)
path.LineTo(0,0)
cvsCanvas.DrawPath(path, xui.Color_Red, True, 0)
End Sub