I have included a full test routine that moves a Rectangle across the screen towards an Ellipse that increases in size.
I want to know when the Red Rectangle (mySqaure) is on the space occupied by the Ellipse (testCricle).
Knowing the centre of the Ellipse it should be possible to do this mathematically (but I am not clever enough) or is there some way to do it by pixel
I know it is possible to get a bitmap image but feel the increasing size of the Ellipse would make this method too slow.
I would very much appreciate any assistance.
Public myEllipse As New Ellipse
Public myLabel As New Label
Public mySquare As New Rectangle
Public myDockpanel As New DockPanel
Public myGrid As New Grid
Public myCanvas As New Canvas
Public myStackPanel As New StackPanel
Public myRectangle As New Rectangle
Public testCircle As New Ellipse
Public myRectangle2 As New Rectangle
Public count As Integer
Public distance As Integer
Friend WithEvents myButton1 As New Button
Public mainRectangle As New Rectangle
Public myPoint As Point
Public missed As Integer
Public mytest As Point
Public dt As New DispatcherTimer
Public intI As Integer
Public posy As Integer
Public posx As Integer
Public testy As Integer
Public testx As Integer
Public speed As Double
View Complete Post