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()); }
public void DrawWord(Graphics graphics, WeightedWord weightedWord, Rectangle rectanglePlace) { graphics.DrawString( weightedWord.Word, new Font(_fontFamily, _converterWeightToSize(weightedWord.Weight), _style), _brush, rectanglePlace.Location ); }