Exemplo n.º 1
0
        public void PutNextRectangle_ReturnRectangleWithCorrectSize()
        {
            var size      = new Size(10, 10);
            var rectangle = layouter.PutNextRectangle(size);

            rectangles.Add(rectangle);
            rectangle.Size.Should().Be(size);
        }
Exemplo n.º 2
0
        public void DrawWord(string word, Font font)
        {
            var graphics = Graphics.FromImage(bitmap);
            var size     = graphics.MeasureString(word, font);
            var rect     = layouter.PutNextRectangle(size.ToSize());

            graphics.DrawString(word, font, brush, rect, stringFormat);
        }