Ejemplo n.º 1
0
        /// <summary>
        /// Create a Shape with a single relative port at its center.
        /// </summary>
        /// <param name="node">The node from which the shape is derived</param>
        /// <returns></returns>
        public static Shape CreateShapeWithRelativeNodeAtCenter(Node node)
        {
            ValidateArg.IsNotNull(node, "node");
            var shape = new RelativeShape(() => node.BoundaryCurve);

            shape.Ports.Insert(new RelativeFloatingPort(() => node.BoundaryCurve, () => node.Center));
            return(shape);
        }
 /// <summary>
 /// Create a Shape with a single relative port at its center.
 /// </summary>
 /// <param name="node">The node from which the shape is derived</param>
 /// <returns></returns>
 public static Shape CreateShapeWithRelativeNodeAtCenter(Node node) {
     ValidateArg.IsNotNull(node, "node");
     var shape = new RelativeShape(() => node.BoundaryCurve);
     shape.Ports.Insert(new RelativeFloatingPort(() => node.BoundaryCurve, () => node.Center));
     return shape;
 }