/// <summary> /// Copies vertical and horionztal measurement data from <paramref name="other"/> frame. /// Does not copy <see cref="Connector"/>. /// </summary> public static void CopyExteriorFrom([NotNull] this NodeLayoutInfo state, [NotNull] NodeLayoutInfo other) { state.TopLeft = other.TopLeft; state.Size = other.Size; state.BranchExterior = other.BranchExterior; state.SiblingsRowV = other.SiblingsRowV; }
/// <summary> /// Ctr. /// </summary> public Node([NotNull] Box element) { Element = element; State = new NodeLayoutInfo(); }
/// <summary> /// Uitility for special boxes, spacers etc. /// Adjusts exterior and resets branch exterior to size. /// </summary> public static void AdjustSpacer([NotNull] this NodeLayoutInfo state, double x, double y, double w, double h) { state.TopLeft = new Point(x, y); state.Size = new Size(w, h); state.BranchExterior = new Rect(x, y, w, h); }
/// <summary> /// Changes <see cref="NodeLayoutInfo.TopLeft"/>. /// </summary> public static void MoveTo([NotNull] this NodeLayoutInfo state, double x, double y) { state.TopLeft = new Point(x, y); }