LinkReshapingTool
The LinkReshapingTool is used to interactively change the route of a Link.
Inherits: ReshapingBaseTool
Properties
protected Link AdornedLink { get; }
value = linkReshapingTool.AdornedLink
Gets the current Link that the AdornedElement is in.
protected int HandleIndex { get; set; }
value = linkReshapingTool.HandleIndex
linkReshapingTool.HandleIndex = value
Gets or sets the index of the handle being dragged.
protected Point OriginalPoint { get; set; }
value = linkReshapingTool.OriginalPoint
linkReshapingTool.OriginalPoint = value
Gets or sets the point of the link's route that is being moved.
protected IList<Point> OriginalPoints { get; set; }
value = linkReshapingTool.OriginalPoints
linkReshapingTool.OriginalPoints = value
Gets or sets a copy of the AdornedLink's route's initial array of Points.
Methods
public override bool CanStart()
result = linkReshapingTool.CanStart()
The LinkReshapingTool may run when there is a mouse-down event on a reshape handle.
protected virtual Point ComputeReshape(Point newPoint)
result = linkReshapingTool.ComputeReshape(newPoint)
Compute the new Point for reshaping a point in the Route.
- newPoint
public override void DoCancel()
linkReshapingTool.DoCancel()
Restore the modified point to be the OriginalPoint and stop this tool.
public override void DoDeactivate()
linkReshapingTool.DoDeactivate()
This stops the current edit (StopTransaction).
public override void DoMouseMove()
linkReshapingTool.DoMouseMove()
Call Point) with a new point determined by the mouse.
public override void DoMouseUp()
linkReshapingTool.DoMouseUp()
Call Point) with a point based on the most recent mouse point, and raise a "link reshaped" event before stopping the tool.
protected virtual void DoReshape(Point newPoint)
linkReshapingTool.DoReshape(newPoint)
Modify the Route of the AdornedLink to a new point, considering also which reshape handle is being dragged and whether the route is Orthogonal.
- newPoint
public override void DoStart()
linkReshapingTool.DoStart()
Capture the mouse when starting this tool.
public override void DoStop()
linkReshapingTool.DoStop()
Release the mouse capture when stopping this tool.
public override void UpdateAdornments(Part part)
linkReshapingTool.UpdateAdornments(part)
Show an Adornment with reshape handles at each of the interesting points of the link's Route, if the link is selected and visible and if CanReshape is true.
- part