public void PutNextRectangle_ReturnRectangleWithCorrectSize() { var size = new Size(10, 10); var rectangle = layouter.PutNextRectangle(size); rectangles.Add(rectangle); rectangle.Size.Should().Be(size); }
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); }