From f25f89101a98ad815c0ae2d25e1a8dc35d53a5dd Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Tue, 29 Oct 2019 13:55:37 +0000
Subject: [PATCH] format state machine
---
src/RichCreator.Utility/CV/CVHelper.cs | 36 +++++++++++++++++++++++++++++++++++-
1 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/src/RichCreator.Utility/CV/CVHelper.cs b/src/RichCreator.Utility/CV/CVHelper.cs
index b3c1992..bee4eb5 100644
--- a/src/RichCreator.Utility/CV/CVHelper.cs
+++ b/src/RichCreator.Utility/CV/CVHelper.cs
@@ -10,6 +10,7 @@
using System.Text;
using System.Threading.Tasks;
using Orientation = RichCreator.Utility.Structs.Orientation;
+using RichCreator.Utility.Captures;
namespace RichCreator.Utility.CV
{
@@ -848,6 +849,39 @@
}
#endregion
-
+
+
+ /// <summary>
+ /// 是否在指定颜色在区域内
+ /// </summary>
+ /// <returns></returns>
+ public static bool RectExistsArray(ZTRectangle rect,ColorArray colorArray)
+ {
+ ZTRectangle colorRect = ZTRectangle.Empty;
+ return RectExistsArray(out colorRect, rect, colorArray);
+ }
+
+
+
+ /// <summary>
+ /// 是否在指定颜色在区域内
+ /// </summary>
+ /// <returns></returns>
+ public static bool RectExistsArray(out ZTRectangle arrayRect,ZTRectangle rect, ColorArray colorArray)
+ {
+
+ //截图
+ System.Drawing.Bitmap bitmap = ScreenCapture.Instance.CaptureScreen();
+ Image<Rgb, byte> image = new Image<Rgb, byte>(bitmap);
+
+ //查找地图右上边是否存在时空之门文字
+ if (CVHelper.FindColorArray(out arrayRect, image, colorArray, rect))
+ {
+ return true;
+ }
+ return false;
+ }
+
+
}
}
--
Gitblit v1.9.3