Exemplo n.º 1
0
        private void DrawWord(string word, int fontSize, Graphics graphics)
        {
            var font      = new Font(options.FontFamily, fontSize);
            var size      = graphics.MeasureString(word, font);
            var intSize   = new Size((int)size.Width + 1, (int)size.Height + 1);
            var rectangle = layouter.PutNextRectangle(intSize);

            graphics.DrawString(word, font, new SolidBrush(Color.FromName(options.Color)), rectangle);
        }
Exemplo n.º 2
0
 public void ThrowException_IfSizeIsDefault()
 {
     Action act = () => ccl.PutNextRectangle(default(Size));
     act.ShouldThrow<ArgumentNullException>();
 }