AffdexMe.DrawingCanvas.DrawingCanvas C# (CSharp) Method

DrawingCanvas() public method

Initializes a new instance of the DrawingCanvas class.
public DrawingCanvas ( ) : System
return System
        public DrawingCanvas()
        {

            DrawMetrics = true;
            DrawPoints = true;
            DrawAppearance = true;
            DrawEmojis = true;
            boundingBrush = new SolidColorBrush(Colors.LightGray);
            pointBrush = new SolidColorBrush(Colors.Cornsilk);
            emojiBrush = new SolidColorBrush(Colors.Black);
            pozMetricBrush = new SolidColorBrush(Colors.LimeGreen);
            negMetricBrush = new SolidColorBrush(Colors.Red);
            boundingPen = new Pen(boundingBrush, 1);

            NameToResourceConverter conv = new NameToResourceConverter();
            metricTypeFace = Fonts.GetTypefaces((Uri)conv.Convert("Square", null, "ttf", null)).First();
            
            Faces = new Dictionary<int, Affdex.Face>();
            emojiImages = new Dictionary<Affdex.Emoji, BitmapImage>();
            appImgs = new Dictionary<string, BitmapImage>();
            MetricNames = new StringCollection();
            upperConverter = new UpperCaseConverter();
            maxTxtWidth = 0;
            maxTxtHeight = 0;

            var emojis = Enum.GetValues(typeof(Affdex.Emoji));
            foreach (int emojiVal in emojis)
            {
                BitmapImage img = loadImage(emojiVal.ToString());
                emojiImages.Add((Affdex.Emoji) emojiVal, img);
            }

            var gender = Enum.GetValues(typeof(Affdex.Gender));
            foreach (int genderVal in gender)
            {
                for (int g = 0; g <= 1 ; g++)
                {
                    string name = ConcatInt(genderVal, g);
                    BitmapImage img = loadImage(name);
                    appImgs.Add(name, img);
                }
                
            }
 

        }