Sub Pane1_Touch (Action As Int, X As Float, Y As Float)
'Action 0 Click
'Action 1 Soltar click
'Action 2 Click mantenido
'Action 100 mover mouse encima
If Action=0 Then
posX_inicio=X
posY_inicio=Y
else if Action=2 Then
canvas1.ClearRect(canvas1.TargetRect)
'canvas1.DrawLine(x, y,posX_inicio , posY_inicio, xui.Color_Black, 2)
canvas1.DrawText("This is a test", X,Y, font1, xui.Color_Black,"LEFT")
' canvas1.DrawCircle(X, Y, 10+posX_inicio, xui.Color_Black, False, 2)
Else if Action=1 Then
' canvas1.DrawLine(x, y,posX_inicio , posY_inicio, xui.Color_BlAck, 2)
' Dim out As OutputStream
' out = File.OpenOutput(File.DirApp, "test.jpg", False)
' Pane1.Snapshot(imagen1.WriteToStream(out, 100, "JPG"))
'
' Dim imagen2 As B4XBitmap
' imagen2 = File.OpenInput(File.DirApp, "test.jpg")
' canvas1.DrawBitmap(imagen2, canvas1.TargetRect)
End If
End Sub