public Point FindColor(int x1, int y1, int x2, int y2, string color, double sim = 0.9, int dir = 0) { object x; object y; dm.FindColor(x1, y1, x2, y2, color, sim, dir, out x, out y); return(new Point((int)x, (int)y)); }
/// <summary> /// 查找指定区域内的颜色,颜色格式"RRGGBB-DRDGDB",注意,和按键的颜色格式相反 /// </summary> /// <param name="dmsoft"></param> /// <param name="findColor"></param> /// <returns></returns> public static Point FindColor(this dmsoft dmsoft, FindColor findColor) { int x, y; int ret = dmsoft.FindColor(findColor.X1, findColor.Y1, findColor.X2, findColor.Y2, findColor.Color, findColor.Sim, findColor.Dir, out x, out y); if (ret == 0) { return(new Point()); } else { return(new Point(x, y)); } }
public int FindColor(int x1, int y1, int x2, int y2, string color, double sim, int dir, out object x, out object y) { return(dm.FindColor(x1, y1, x2, y2, color, sim, dir, out x, out y)); }