Esempio n. 1
0
        /// <summary>
        /// 查找指定区域内的颜色块,颜色格式"RRGGBB-DRDGDB",注意,和按键的颜色格式相反
        /// </summary>
        /// <param name="dmsoft"></param>
        /// <param name="findColor"></param>
        /// <returns>指向颜色块的左上角</returns>
        public static Point FindColorBlock(this dmsoft dmsoft, FindColorBlock findColor)
        {
            int x, y;
            int ret = dmsoft.FindColorBlock(findColor.X1, findColor.Y1, findColor.X2, findColor.Y2, findColor.Color, findColor.Sim, findColor.Count, findColor.Width, findColor.Height, out x, out y);

            if (ret == 0)
            {
                return(new Point());
            }
            else
            {
                return(new Point(x, y));
            }
        }