Beispiel #1
0
 /// <summary>
 /// 全屏用系统字库找字。系统字库找字一般不适用于游戏,成功率也低。
 /// </summary>
 public Point FindStrWithFont(string text, string color_format, double sim, FontInfo fontInfo)
 {
     return FindStrWithFont(0,0,win.ClientSize.Width,win.ClientSize.Height, text, color_format, sim, fontInfo);
 }
Beispiel #2
0
 /// <summary>
 /// 区域用系统字库找所有字。系统字库找字一般不适用于游戏,成功率也低。
 /// </summary>
 public List<Point> FindAllStrWithFont(int x1, int y1, int x2, int y2, string text, string color_format, double sim, FontInfo fontInfo)
 {
     string result = win.Dmsoft.FindStrWithFontEx(x1, y1, x2, y2, text, color_format, sim, fontInfo.Name, fontInfo.Size, fontInfo.Flag);
     int count = win.Dmsoft.GetResultCount(result);
     List<Point> points = new List<Point>();
     COMParam<int> x = new COMParam<int>(0);
     COMParam<int> y = new COMParam<int>(0);
     for(int i = 0; i < count; i++) {
         win.Dmsoft.GetResultPos(result, i, out x.Data, out y.Data);
         points.Add(new Point(x.Value, y.Value));
     }
     return points;
 }
Beispiel #3
0
 /// <summary>
 /// 区域用系统字库查找。系统字库找字一般不适用于游戏,成功率也低。
 /// </summary>
 /// <param name="x1"></param>
 /// <param name="y1"></param>
 /// <param name="x2"></param>
 /// <param name="y2"></param>
 /// <param name="text"></param>
 /// <param name="color_format"></param>
 /// <param name="sim"></param>
 /// <param name="fontInfo"></param>
 /// <returns></returns>
 public Point FindStrWithFont(int x1,int y1,int x2,int y2,string text,string color_format,double sim,FontInfo fontInfo)
 {
     COMParam<int> x = new COMParam<int>(0);
     COMParam<int> y = new COMParam<int>(0);
     win.Dmsoft.FindStrWithFont(x1, y1, x2, y2, text, color_format, sim, fontInfo.Name, fontInfo.Size, fontInfo.Flag,out x.Data,out y.Data);
     return new Point(x.Value, y.Value);
 }