Sub mnuTilt(x As Int, y As Int, w As Int, h As Int)
Dim btmpBlur As Bitmap
btmpBlur = canvas1.Bitmap
btmpBlur = effects.Blur(btmpBlur, 16,0)
btmpTilt = image.extractBitmap(btmpTilt, x, y, w, h)
btmpFlower = blend.blend(btmpBlur, btmpTilt, x, y)
Panel1.SetBackgroundImage(btmpFlower)
End Sub
Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
If Action = Activity.ACTION_DOWN Then
sx = X
sy = Y
Else
If Action = Activity.ACTION_MOVE Then
'Draw the new rectangle
Rect1.Left = Min(sx, X)
Rect1.Right = Max(sx, X)
Rect1.Top = Min(sy, Y)
Rect1.Bottom = Max(sy, Y)
End If
End If
If Action = Activity.ACTION_UP Then
canvas1.DrawRect(Rect1, Colors.White, False, 1)
Panel1.Invalidate
mnuTilt(Rect1.Left, Rect1.Top, Rect1.Right, Rect1.Bottom)
End If
End Sub