Esempio n. 1
0
        public Size GetWordSize(Graphics graphics, WeightedWord weightedWord)
        {
            var font          = new Font(_fontFamily, _converterWeightToSize(weightedWord.Weight), _style);
            var measureString = graphics.MeasureString(weightedWord.Word, font);

            return(measureString.ToSize());
        }
Esempio n. 2
0
 public void DrawWord(Graphics graphics, WeightedWord weightedWord, Rectangle rectanglePlace)
 {
     graphics.DrawString(
         weightedWord.Word,
         new Font(_fontFamily, _converterWeightToSize(weightedWord.Weight), _style),
         _brush,
         rectanglePlace.Location
         );
 }