Esempio n. 1
0
 public static bool IsValidChatImage(BitmapData chatImageData, int threshold = 5)
 {
     using (var locator = new ChatFinder(chatImageData, threshold))
     {
         return(locator.IsValidChatImage());
     }
 }
Esempio n. 2
0
 public static Rectangle GetChatTextAreaRect(BitmapData chatImageData, int threshold = 5)
 {
     using (var locator = new ChatFinder(chatImageData, threshold))
     {
         return(locator.GetChatTextAreaRect());
     }
 }
Esempio n. 3
0
 public static Rectangle GetChatWindowRect(Bitmap windowImage, int threshold = 5)
 {
     using (var locator = new ChatFinder(windowImage, threshold))
     {
         return(locator.GetChatWindowRect());
     }
 }
 private TextLinesFinder(Bitmap chatImage, int threshold = 5)
 {
     this.chatImage = chatImage;
     this.data      = chatImage.LockBits(new Rectangle(0, 0, chatImage.Width, chatImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
     if (ChatFinder.IsValidChatImage(this.data, threshold))
     {
         this.textArea = ChatFinder.GetChatTextAreaRect(this.data, threshold);
     }
 }