Public Sub Show
If frm.IsInitialized = False Then
frm.Initialize("frm", 400, 600)
frm.RootPane.LoadLayout("1")
Create
End If
Clear
cnvImage.Invalidate
frm.ShowAndWait
End Sub
Sub Create
bmpImage = xui.LoadBitmapResize(File.DirAssets, "greenImage.png", 400, 600, False)
DestRect.Initialize(0, 0, 400, 600)
cnvImage.Initialize(Pane1)
cnvImage.DrawBitmapRotated(bmpImage, DestRect, 0)
End Sub
Sub Clear
cnvImage.ClearRect(cnvImage.TargetRect)
cnvImage.DrawBitmapRotated(bmpImage, DestRect, 0)
End Sub
Sub Pane1_MouseDragged (EventData As MouseEvent)
Clear
cnvImage.DrawLine(0, 0, EventData.X, EventData.Y, xui.Color_White, 2)
cnvImage.Invalidate
End Sub