Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompoundFDPLayoutAlgorithm{TVertex,TEdge,TGraph}"/> class.
 /// </summary>
 /// <param name="visitedGraph">Graph to layout.</param>
 /// <param name="verticesSizes">Vertices sizes.</param>
 /// <param name="verticesBorders">Vertices borders.</param>
 /// <param name="layoutTypes">Layout types per vertex.</param>
 /// <param name="parameters">Optional algorithm parameters.</param>
 public CompoundFDPLayoutAlgorithm(
     [NotNull] TGraph visitedGraph,
     [NotNull] IDictionary <TVertex, Size> verticesSizes,
     [NotNull] IDictionary <TVertex, Thickness> verticesBorders,
     [NotNull] IDictionary <TVertex, CompoundVertexInnerLayoutType> layoutTypes,
     [CanBeNull] CompoundFDPLayoutParameters parameters = null)
     : this(visitedGraph, null, verticesSizes, verticesBorders, layoutTypes, parameters)
 {
 }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CompoundFDPLayoutAlgorithm{TVertex,TEdge,TGraph}"/> class.
        /// </summary>
        /// <param name="visitedGraph">Graph to layout.</param>
        /// <param name="verticesPositions">Vertices positions.</param>
        /// <param name="verticesSizes">Vertices sizes.</param>
        /// <param name="verticesBorders">Vertices borders.</param>
        /// <param name="layoutTypes">Layout types per vertex.</param>
        /// <param name="parameters">Optional algorithm parameters.</param>
        public CompoundFDPLayoutAlgorithm(
            [NotNull] TGraph visitedGraph,
            [CanBeNull] IDictionary <TVertex, Point> verticesPositions,
            [NotNull] IDictionary <TVertex, Size> verticesSizes,
            [NotNull] IDictionary <TVertex, Thickness> verticesBorders,
            [NotNull] IDictionary <TVertex, CompoundVertexInnerLayoutType> layoutTypes,
            [CanBeNull] CompoundFDPLayoutParameters parameters = null)
            : base(visitedGraph, verticesPositions, parameters)
        {
            _verticesSizes   = verticesSizes ?? throw new ArgumentNullException(nameof(verticesSizes));
            _verticesBorders = verticesBorders ?? throw new ArgumentNullException(nameof(verticesBorders));
            _layoutTypes     = layoutTypes ?? throw new ArgumentNullException(nameof(layoutTypes));

            _compoundGraph = VisitedGraph is ICompoundGraph <TVertex, TEdge> compoundGraph
                ? new CompoundGraph <TVertex, TEdge>(compoundGraph)
                : new CompoundGraph <TVertex, TEdge>(VisitedGraph);
        }