/// <summary> /// creates the port visual if it does not exist, and sets the port location /// </summary> /// <param name="portLocation"></param> public void SetSourcePortForEdgeRouting(Point portLocation) { var box = new Core.Geometry.Rectangle(portLocation); box.Pad(UnderlyingPolylineCircleRadius); if (SourcePortIsPresent) { var prevBox = new Core.Geometry.Rectangle(SourcePortLocation); prevBox.Pad(UnderlyingPolylineCircleRadius); box.Add(prevBox); } SourcePortIsPresent = true; SourcePortLocation = portLocation; panel.Invalidate(MapSourceRectangleToScreenRectangle(box)); }
/// <summary> /// /// </summary> public void RemoveSourcePortEdgeRouting() { if (SourcePortIsPresent) { var prevBox = new Core.Geometry.Rectangle(SourcePortLocation); prevBox.Pad(UnderlyingPolylineCircleRadius); panel.Invalidate(MapSourceRectangleToScreenRectangle(prevBox)); SourcePortIsPresent = false; } }