Ejemplo n.º 1
0
 static void TransferVerticalConstraints(VerticalConstraintsForLayeredLayout verticalConstraints,
                                         SugiyamaLayoutSettings sugiyamaLayoutSettings)
 {
     foreach (Node node in verticalConstraints._minLayerOfDrawingGraph)
     {
         CheckGeomNode(node);
         sugiyamaLayoutSettings.PinNodesToMinLayer(node.GeometryNode);
     }
     foreach (Node node in verticalConstraints._maxLayerOfDrawingGraph)
     {
         CheckGeomNode(node);
         sugiyamaLayoutSettings.PinNodesToMaxLayer(node.GeometryNode);
     }
     foreach (var couple in verticalConstraints.SameLayerConstraints)
     {
         CheckGeomNode(couple.Item1); CheckGeomNode(couple.Item2);
         sugiyamaLayoutSettings.PinNodesToSameLayer(couple.Item1.GeometryNode,
                                                    couple.Item2.GeometryNode);
     }
     foreach (var couple in verticalConstraints.UpDownConstraints)
     {
         CheckGeomNode(couple.Item1); CheckGeomNode(couple.Item2);
         sugiyamaLayoutSettings.AddUpDownConstraint(couple.Item1.GeometryNode,
                                                    couple.Item2.GeometryNode);
     }
 }
        static void TransferVerticalConstraints(VerticalConstraintsForLayeredLayout verticalConstraints,
                                                SugiyamaLayoutSettings sugiyamaLayoutSettings) {
            foreach (Node node in verticalConstraints._minLayerOfDrawingGraph)
            {
                CheckGeomNode(node);
                sugiyamaLayoutSettings.PinNodesToMinLayer(node.GeometryNode);
            }
            foreach (Node node in verticalConstraints._maxLayerOfDrawingGraph)
            {
                CheckGeomNode(node);
                sugiyamaLayoutSettings.PinNodesToMaxLayer(node.GeometryNode);
            }
            foreach (var couple in verticalConstraints.SameLayerConstraints)
            {
                CheckGeomNode(couple.Item1); CheckGeomNode(couple.Item2);
                sugiyamaLayoutSettings.PinNodesToSameLayer(couple.Item1.GeometryNode,
                    couple.Item2.GeometryNode);
            }
            foreach (var couple in verticalConstraints.UpDownConstraints)
            {

                CheckGeomNode(couple.Item1); CheckGeomNode(couple.Item2);
                sugiyamaLayoutSettings.AddUpDownConstraint(couple.Item1.GeometryNode,
                    couple.Item2.GeometryNode);
            }
                                                }