Exemplo n.º 1
0
        /// <summary>
        /// Gets the character by color map.
        /// </summary>
        /// <param name="colorMap">The color map.</param>
        /// <param name="fontColor">Color of the font.</param>
        /// <returns></returns>
        public char GetCharacterByColorMap(System.Drawing.Color[][] colorMap, System.Drawing.Color fontColor)
        {
            var character = characterSet.AsParallel().FirstOrDefault(c => c.Match(colorMap, fontColor));

            if (character == null)
            {
                throw new System.NotImplementedException("Character not implemented");
            }

            return(character.Character);
        }