コード例 #1
0
        public static void wrong_Point_exterminate(LJJSPoint startPoint, List <LJJSPoint> list)
        {
            List <LJJSPoint> Remove_wrong_point_list = new List <LJJSPoint>();



            for (int ss = 0; ss < list.Count; ss++)
            {
                if (list[ss].YValue > 0 || list[ss].XValue < startPoint.XValue || list[ss].XValue >= startPoint.XValue + 50)
                {
                    //MessageBox.Show(string.Format("error,坐标:({0},{1})", drawptcol[ss].XValue.ToString(), drawptcol[ss].YValue.ToString()));

                    //GAY


                    if (list[ss].YValue > 0)
                    {
                        Remove_wrong_point_list.Add(list[ss]);


                        continue;
                    }
                    if (list[ss].XValue < startPoint.XValue || list[ss].XValue >= startPoint.XValue + 50)
                    {
                        list[ss].XValue = startPoint.XValue;
                    }
                }
            }


            //GAY
            foreach (LJJSPoint sss in Remove_wrong_point_list)
            {
                list.Remove(sss);
            }


            AddLineHatchManager.Remove_Redundant_Point(startPoint, list); //去除具有同yvalue的点
        }