Sub Globals
Dim gv As GameView
Dim cvs As Canvas
Private px, py As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
gv.Initialize("gv")
Activity.AddView(gv, 0, 0, 100%x, 100%y)
Dim bgd As Bitmap
bgd.InitializeMutable(gv.Width, gv.Height)
Dim bd As BitmapData
bd.Bitmap = bgd
bd.DestRect.Initialize(0, 0, gv.Width, gv.Height)
gv.BitmapsData.Add(bd)
cvs.Initialize2(bgd)
End Sub
Sub gv_Touch (Action As Int, X As Float, Y As Float)
cvs.DrawLine(px, py, X, Y, Colors.Red, 2dip)
px = X
py = Y
gv.Invalidate
End Sub