Пример #1
0
        /// <summary>
        /// Extended GetPixel method
        /// <param name="position">Signal pixel position</param>
        /// <returns>RGB value</returns>
        /// </summary>
        public int GetPixel(ClientPosition position)
        {
            Point point = TranslatePosition(position);

            point.Offset(ClientToScreen);
            WoWDC dc = new WoWDC();

            return(dc.CaptureAndGetPixel(point.X, point.Y));
        }
Пример #2
0
        /// <summary>
        /// Wait until the pixel matches predefined color or timeout
        /// <param name="position">Client position.</param>
        /// <param name="timeout">Timeout in milliseconds, wait infinitely if this parameter is 0..</param>
        /// <returns>Return RGB value if matches, -1 otherwise.</returns>
        /// </summary>
        public int WaitForKnownPixel(ClientPosition position, int timeout)
        {
            Point point = TranslatePosition(position);

            point.Offset(ClientToScreen);
            WoWDC dc = new WoWDC();

            return(dc.WaitForKnownPixel(point.X, point.Y, timeout));
        }
Пример #3
0
 /// <summary>
 /// Check whether an RGB value is a predefined sinal color.
 /// <param name="color">RGB value</param>
 /// <returns>Return true of matches, false otherwise</returns>
 /// </summary>
 public static bool IsKnownPixel(int color)
 {
     return(WoWDC.IsKnownPixel(color));
 }