Ejemplo n.º 1
0
        static void Display(OutLine outLine)
        {
            var randomValue = new Random().Next(10);

            GraphicsDisplayer.DisplayClosedInterval(outLine.Points, null, false);
            if (outLine.Points.Count <= 6)
            {
                GraphicsDisplayer.DisplayPoints(outLine.Points, null, randomValue, randomValue);
            }

            foreach (var subOutLine in outLine.SubOutLines)
            {
                Display(subOutLine);
            }

            GraphicsDisplayer.DisplayPoints(outLine.Points, null, true);
        }
Ejemplo n.º 2
0
        public static void Display(string path, SeperatePoints lineSeperatePoints, List <LevelOutLines> outLinesCollection)
        {
            var maxX    = (int)outLinesCollection.Max(c => c.OutLines.Max(v => v.Points.Max(b => b.X)));
            var minX    = (int)outLinesCollection.Min(c => c.OutLines.Min(v => v.Points.Min(b => b.X)));
            var maxY    = (int)outLinesCollection.Max(c => c.OutLines.Max(v => v.Points.Max(b => b.Y)));
            var minY    = (int)outLinesCollection.Min(c => c.OutLines.Min(v => v.Points.Min(b => b.Y)));
            var offSetX = -minX;
            var offSetY = -minY;

            GraphicsDisplayer = new GraphicsDisplayer(minX, maxX, minY, maxY);
            foreach (var levelOutLines in outLinesCollection)
            {
                foreach (var outLine in levelOutLines.OutLines)
                {
                    Display(outLine);
                }
            }
            GraphicsDisplayer.DisplayClosedInterval(lineSeperatePoints.AdvancedPoints.Select(c => c.Point).ToList(), new Pen(Brushes.Red), true);
            var randomValue = new Random().Next(10);

            GraphicsDisplayer.DisplayPoints(lineSeperatePoints.AdvancedPoints.Select(c => c.Point).ToList(), Brushes.Red, randomValue, randomValue);
            GraphicsDisplayer.SaveTo(path);
        }