// main.cs // C:>csc /t:winexe main.cs using System; using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Drawing2D; class AWindow : System.Windows.Forms.Form { private int m_mouse_x; private int m_mouse_y; private void OnPaint(object sender, System.Windows.Forms.PaintEventArgs e) { System.Drawing.Graphics g = e.Graphics; int[] coords0 = new int[] {5,5, 80, 80 }; //int[] coords0 = new int[] {30,30, 180, 38}; int iLen = coords0.Length; iLen -= 2; GraphicsPath path = new GraphicsPath(); for(int i=0; id ) this.Text = "inside"; else this.Text = "outside"; } }// End of OnPaint(..) bool isInsidePoly() { // We'll use the dot product to determine which side of the line where on. int[] coords0 = new int[] {5,5, 30, 30 }; int iLen = coords0.Length; iLen -= 2; for(int i=0; i