Class CurvedLinkReshapingTool
This CurvedLinkReshapingTool class allows for a Link's path to be modified by the user via the dragging of a single tool handle at the middle of the link. Dragging the handle changes the value of Curviness.
Namespace: Northwoods.Go.Tools.Extensions
Assembly: CurvedLinkReshapingAvalonia.dll
Syntax
public class CurvedLinkReshapingTool : LinkReshapingTool
Constructors
CurvedLinkReshapingTool()
Constructs a CurvedLinkReshapingTool.
Declaration
public CurvedLinkReshapingTool()
Methods
DoActivate()
Start reshaping, if FindToolHandleAt(Point, string) finds a reshape handle at the mouse down point.
Declaration
public override void DoActivate()
Overrides
Remarks
If successful this sets Handle to be the reshape handle that it finds and AdornedLink to be the Link being routed. It also remembers the original link route (a list of Points) and curviness in case this tool is cancelled. And it starts a transaction.
DoCancel()
Restore the link route to be the original points and curviness and stop this tool.
Declaration
public override void DoCancel()
Overrides
Reshape(Point)
Change the route of the AdornedLink by moving the point corresponding to the current Handle to be at the given Point.
Declaration
public override void Reshape(Point newPoint)
Parameters
Type | Name | Description |
---|---|---|
Point | newPoint | the value of the call to Reshape(Point) |
Overrides
Remarks
This is called by DoMouseMove() and DoMouseUp() with the result of calling ComputeReshape(Point) to constrain the input point.