Ejemplo n.º 1
0
        void tst_but_gen_Click(object sender, RoutedEventArgs e)
        {
            var graph = GenerateTestGraph();
            var logic = new LogicCoreExample {Graph = graph};
            logic.EnableParallelEdges = false;
            logic.ParallelEdgeDistance = 15;

            tst_Area.ShowAllEdgesArrows(false);

            var layParams = new LinLogLayoutParameters { IterationCount = 100 };
            logic.DefaultLayoutAlgorithm = LayoutAlgorithmTypeEnum.LinLog;
            logic.DefaultLayoutAlgorithmParams = layParams;
            var overlapParams = new OverlapRemovalParameters { HorizontalGap = 100, VerticalGap = 100 };
            logic.DefaultOverlapRemovalAlgorithm = OverlapRemovalAlgorithmTypeEnum.FSA;
            logic.DefaultOverlapRemovalAlgorithmParams = overlapParams;
            IExternalEdgeRouting<DataVertex, DataEdge> erParams = null;
            //logic.ExternalEdgeRoutingAlgorithm =

            tst_Area.GenerateGraph(graph, true);
            //tst_Area.VertexList[v1].Visibility = System.Windows.Visibility.Collapsed;
            //tst_Area.VertexList[v2].Visibility = System.Windows.Visibility.Collapsed;
            //tst_Area.VertexList[v3].Visibility = System.Windows.Visibility.Collapsed;
            //tst_Area.VertexList[v4].SetPosition(new Point(0, 0));
            tst_Area.ShowAllEdgesLabels();
            tst_Area.AlignAllEdgesLabels();
            tst_zoomctrl.ZoomToFill();

               /* var img = new BitmapImage(new Uri(@"pack://application:,,,/ShowcaseExample;component/Images/birdy.png", UriKind.Absolute)) { CacheOption = BitmapCacheOption.OnLoad };
            GraphAreaBase.SetX(img, -100);
            GraphAreaBase.SetY(img, -100);
            var image = new Image() { Source = img, Width = 100, Height = 100 };
            var border = new Border() { BorderBrush = Brushes.Black, BorderThickness = new Thickness(2), Background = Brushes.Black, Width = 100, Height = 100 };
            image.Visibility = System.Windows.Visibility.Visible;
            border.Visibility = System.Windows.Visibility.Visible;
            tst_Area.InsertCustomChildControl(0, image);
            tst_Area.InsertCustomChildControl(0, border);*/
        }
Ejemplo n.º 2
0
 public LinLogLayoutAlgorithm(TGraph visitedGraph, IDictionary <TVertex, Point> positions,
                              LinLogLayoutParameters parameters)
     : base(visitedGraph, positions, parameters)
 {
 }