Public Sub DrawHouse (Parent As B4XView, TargetX As Float, TargetY As Float, VisibleDuration As Int)
Parent.AddView(base, TargetX, TargetY, base.Width, base.Height)
cvs.ClearRect(cvs.TargetRect)
Dim duration As Int = 300
DrawLineAnimated(duration, 20, 10dip, 100dip, 110dip, 100dip, True)
Sleep(duration)
DrawLineAnimated(duration, 20, 110dip, 100dip, 110dip, 200dip, True)
Sleep(duration)
DrawLineAnimated(duration, 20, 110dip, 200dip, 10dip, 200dip, True)
Sleep(duration)
DrawLineAnimated(duration, 20, 10dip, 200dip, 10dip, 100dip, True)
Sleep(duration)
DrawLineAnimated(duration, 20, 10dip, 100dip, 110dip, 200dip, False) 'It will be invalidated in the next line
DrawLineAnimated(duration, 20, 110dip, 100dip, 10dip, 200dip, True)
Sleep(duration)
DrawLineAnimated(duration, 20, 10dip, 100dip, 60dip, 50dip, False)
DrawLineAnimated(duration, 20, 110dip, 100dip, 60dip, 50dip, True)
Sleep(duration)
Sleep(VisibleDuration)
base.SetVisibleAnimated(100, False)
Sleep(100)
base.RemoveViewFromParent
cvs.Release
End Sub