Example #1
0
        private static void ShowDebugView(List <RectangleToPack <int> > rectangles)
        {
#if TEST_MSAGL
            if (!MsaglTestBase.EnableDebugViewer())
            {
                return;
            }
            var shapes = from r in rectangles select new DebugCurve(CurveFactory.CreateRectangle(r.Rectangle));
            LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(shapes);
#endif
        }
Example #2
0
        private static void VerifyAndDisplayConvexHull(Point[] points)
        {
            var hull = new Polyline(ConvexHull.CalculateConvexHull(points))
            {
                Closed = true
            };

            VerifyPointsAreInOrOnHull(points, hull);

#if TEST_MSAGL
            MsaglTestBase.EnableDebugViewer();
            if (LayoutAlgorithmSettings.ShowDebugCurvesEnumeration == null)
            {
                return;
            }
            var poly = new Polyline(points);
            LayoutAlgorithmSettings.ShowDebugCurves(new DebugCurve(100, 0.01, "magenta", hull), new DebugCurve(100, 0.001, "green", poly));
#endif
        }
 public override void Initialize()
 {
     graph = MsaglTestBase.CreateClusteredGraph();
 }