Example #1
0
        static void TransferHorizontalConstraints(HorizontalConstraintsForLayeredLayout horizontalConstraints,
                                                  SugiyamaLayoutSettings sugiyamaLayoutSettings)
        {
            foreach (var couple in horizontalConstraints.UpDownVerticalConstraints)
            {
                sugiyamaLayoutSettings.AddUpDownVerticalConstraint(couple.Item1.GeometryNode,
                                                                   couple.Item2.GeometryNode);
            }
            foreach (var couple in horizontalConstraints.LeftRightConstraints)
            {
                sugiyamaLayoutSettings.AddLeftRightConstraint(couple.Item1.GeometryNode,
                                                              couple.Item2.GeometryNode);
            }

            foreach (var couple in horizontalConstraints.LeftRightNeighbors)
            {
                sugiyamaLayoutSettings.AddSameLayerNeighbors(couple.Item1.GeometryNode,
                                                             couple.Item2.GeometryNode);
            }
        }
        static void TransferHorizontalConstraints(HorizontalConstraintsForLayeredLayout horizontalConstraints,
                                                  SugiyamaLayoutSettings sugiyamaLayoutSettings) {
            foreach (var couple in horizontalConstraints.UpDownVerticalConstraints)
                sugiyamaLayoutSettings.AddUpDownVerticalConstraint(couple.Item1.GeometryNode,
                                                                   couple.Item2.GeometryNode);
            foreach (var couple in horizontalConstraints.LeftRightConstraints)
                sugiyamaLayoutSettings.AddLeftRightConstraint(couple.Item1.GeometryNode,
                                                              couple.Item2.GeometryNode);

            foreach (var couple in horizontalConstraints.LeftRightNeighbors)
                sugiyamaLayoutSettings.AddSameLayerNeighbors(couple.Item1.GeometryNode,
                                                             couple.Item2.GeometryNode);
        }