Sub ScaleImageView1_Click 'The user has tapped on the view. Use ClickImage or ClickView for the coordinates.
Dim siv As ScaleImageView = Sender
imagex = siv.ClickImageX
imagey = siv.ClickImageY
' siv.Invalidate ' draw the new position
End Sub
Sub ScaleImageView1_OnDraw(viewcanvas As Canvas) 'The view is being redrawn. Use viewcanvas to draw on it.
Dim siv As ScaleImageView = Sender
Dim viewxy() As Float = siv.SourceXYtoViewXY(imagex, imagey)
Dim r As Rect
r.Initialize(viewxy(0), viewxy(1), viewxy(0) + 30dip, viewxy(1) + 30dip)
viewcanvas.DrawBitmap(bmpGermany, Null, r)
siv.Invalidate2(r)
End Sub