/// <summary> /// 根据指定的多点查找所有颜色坐标 /// </summary> /// <param name="dmsoft"></param> /// <param name="findColor"></param> /// <returns>返回所有颜色信息的坐标值,然后通过GetResultCount等接口来解析(由于内存限制,返回的坐标数量最多为1800个左右)</returns> public static List <Point> FindMultiColorEx(this dmsoft dmsoft, FindMultiColorEx findColor) { List <Point> points = new List <Point>(); string s = dmsoft.FindMultiColorEx(findColor.X1, findColor.Y1, findColor.X2, findColor.Y2, findColor.FirstColor, findColor.OffsetColor, findColor.Sim, findColor.Dir); int x, y; int index = 0; int count = dmsoft.GetResultCount(s); while (index < count) { dmsoft.GetResultPos(s, index++, out x, out y); points.Add(new Point(x, y)); } return(points); }