Sub DrawSinus (width As Int)
Dim bmp As B4XBitmap = xui.LoadBitmapResize(File.DirAssets, "logo.png", 32, 32, True)
Dim source As BCPaintSource = bc.CreatePaintSourceFromBitmap(bmp)
Dim p As BCPath
p.Initialize(0, 0)
For x = 0 To 1000 Step 12
Dim y As Float = 100 * SinD(x) + 200
p.LineTo(x, y)
Next
bc.DrawPath(p, xui.Color_Red, False, width)
Do While True
source.SrcOffsetY = source.SrcOffsetY + 1
source.SrcOffsetX = source.SrcOffsetX + 1
bc.DrawCircle2(400, 400, 100, source, True, 0)
ImageView1.SetBitmap(bc.Bitmap)
Sleep(50)
Loop
End Sub