/// <summary> /// Updates the absolute terminal point in the given state for the given /// start and end state, where start is the source if source is true. /// </summary> /// <param name="edge">State whose terminal point should be updated.</param> /// <param name="start">for the terminal on "this" side of the edge.</param> /// <param name="end">for the terminal on the other side of the edge.</param> /// <param name="source">Boolean indicating if start is the source terminal state.</param> public void UpdateFloatingTerminalPoint(mxCellState edge, mxCellState start, mxCellState end, bool source) { start = GetTerminalPort(edge, start, source); mxPoint next = GetNextPoint(edge, end, source); double border = mxUtils.GetDouble(edge.Style, mxConstants.STYLE_PERIMETER_SPACING); border += mxUtils.GetDouble(edge.Style, (source) ? mxConstants.STYLE_SOURCE_PERIMETER_SPACING : mxConstants.STYLE_TARGET_PERIMETER_SPACING); mxPoint pt = GetPerimeterPoint(start, next, graph.IsOrthogonal(edge), border); edge.SetAbsoluteTerminalPoint(pt, source); }