Пример #1
0
        public static void Main(string[] args)
        {
            var layouter   = new CircularCloudLayouter(new Point(5000, 5000));
            var visualizer = new Visualizer();
            var rectangles = GenerateRectangles(layouter);

            visualizer.Visualize(rectangles, new Size(10000, 10000))
            .Save("Cloud.png", ImageFormat.Png);
        }
Пример #2
0
        public static void Main()
        {
            var center     = new Point(400, 400);
            var spiral     = new CrossSpiral(center);
            var layouter   = new Layouter(center, spiral);
            var visualiser = new Visualizer();
            var testData   = GenerateNewLayout(layouter, 50);

            visualiser.Visualize(testData, "BigTest.bmp");
        }
Пример #3
0
 public void CreateImageOnFail()
 {
     if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
     {
         var visualizer = new Visualizer();
         var testName   = TestContext.CurrentContext.Test.Name;
         var directory  = Directory.GetCurrentDirectory();
         var path       = Path.Combine(directory, "TearDownImages", $"{testName}.png");
         var bmp        = visualizer.Visualize(BaseLayouter.GetRectangles(), new Size(200, 200));
         bmp.Save(path, ImageFormat.Png);
         TestContext.WriteLine($"Tag cloud visualization saved to file {path}");
     }
 }
Пример #4
0
        public void DrawOnFailure()
        {
            if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Failed)
            {
                return;
            }

            var visualizator = new Visualizer();
            var dir          = TestContext.CurrentContext.TestDirectory;
            var testName     = TestContext.CurrentContext.Test.Name;
            var path         = dir + testName + ".bmp";

            visualizator.Visualize(cloudLayouter.GetRectangles(), path);
            Console.WriteLine("Tag cloud visualization saved to file " + path);
        }