Пример #1
0
        public static void Main()
        {
            var image = new RectangleLayoutVisualizer()
                        .Visualize(new Size(1000, 1000), GenerateRandomLayout(), new Point(0, 0));

            new ImageSaver().Save(image, "file.png");
        }
Пример #2
0
        public void TearDown()
        {
            if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Failed)
            {
                return;
            }

            var name = $"{TestContext.CurrentContext.Test.FullName}.png";
            var path = Path.Combine(Environment.CurrentDirectory, name);

            var visualizer = new RectangleLayoutVisualizer();
            var image      = visualizer.Visualize(new Size(700, 700),
                                                  circularCloudLayouter.PastRectangles.ToArray(), new Point(0, 0));

            new ImageSaver().Save(image, path);

            TestContext.Error.Write($@"Tag cloud visualization saved to file <{path}>");
        }