Class ResizeTool
Interactive tool for resizing nodes.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class ResizeTool : Tool, IDisposable
Remarks
Constructors
ResizeTool(DiagramController, Node, BoxPosition, Tool)
Initializes a new instance of the ResizeTool class.
Declaration
public ResizeTool(DiagramController controller, Node nodeResizing, BoxPosition handleHit, Tool toolPrevious)
Parameters
Type | Name | Description |
---|---|---|
DiagramController | controller | The controller. |
Node | nodeResizing | The node resizing. |
BoxPosition | handleHit | The handle hit. |
Tool | toolPrevious | The tool previous. |
Properties
RenderHelper
Gets the rendering helper node.
Declaration
public Node RenderHelper { get; }
Property Value
Type | Description |
---|---|
Node | The rendering helper. |
Remarks
Node clone of current node resizing for tracking.
Snapshots
Gets the snapshots hash where key is node and value - caches image.
Declaration
protected Hashtable Snapshots { get; }
Property Value
Type | Description |
---|---|
System.Collections.Hashtable | The snapshots. |
Methods
Abort()
Deactivate tool.
Declaration
public override Tool Abort()
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ActivateTool()
Activate resize tool.
Declaration
public override void ActivateTool()
Overrides
AppendHandleFlip(ref BoxPosition, Node)
Appends node flip to handle.
Declaration
public static void AppendHandleFlip(ref BoxPosition handle, Node node)
Parameters
Type | Name | Description |
---|---|---|
BoxPosition | handle | Box position |
Node | node | The node |
Remarks
Flip BoxPosition handle horizontally and/or vertically using node property flip.
CanResize()
Determines whether this instance can resize the specified node hit.
Declaration
protected bool CanResize()
Returns
Type | Description |
---|---|
System.Boolean |
|
CanResize(SizeF)
Determines whether this instance can resize the specified node hit.
Declaration
protected bool CanResize(SizeF szOffset)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.SizeF | szOffset | The size offset. |
Returns
Type | Description |
---|---|
System.Boolean |
|
DeactivateTool()
Deactivates the tool.
Declaration
public override void DeactivateTool()
Overrides
Dispose()
Declaration
public override void Dispose()
Overrides
Draw(Graphics)
Draw resizing helper node.
Declaration
public override void Draw(Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
Overrides
Remarks
Draw clone of resizing node with applying alter style.
DrawRenderHelper(Node, Graphics)
Draws render helper
Declaration
protected override void DrawRenderHelper(Node renderHelper, Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
Node | renderHelper | The render helper. |
System.Drawing.Graphics | gfx | Graphics to draw on. |
Overrides
GetResizeCursors(BoxPosition, Node)
Get Cursor for resize with node rotate.
Declaration
public static BoxPosition GetResizeCursors(BoxPosition handlePos, Node node)
Parameters
Type | Name | Description |
---|---|---|
BoxPosition | handlePos | Get current position |
Node | node | The node. |
Returns
Type | Description |
---|---|
BoxPosition | Box position |
OnOriginChanged(ViewOriginEventArgs)
Raise the origin changed event.
Declaration
protected override void OnOriginChanged(ViewOriginEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
ViewOriginEventArgs | evtArgs | The ViewOriginEventArgs instance containing the event data. |
Overrides
ProcessMouseDown(MouseEventArgs)
Processes the mouse down.
Declaration
public override Tool ProcessMouseDown(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseMove(MouseEventArgs)
Processes the mouse move.
Declaration
public override Tool ProcessMouseMove(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseUp(MouseEventArgs)
Processes the mouse up.
Declaration
public override Tool ProcessMouseUp(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
UpdateSizeAndPinPosition(Node, BoxPosition, SizeF)
Updates size and pin point position.
Declaration
protected void UpdateSizeAndPinPosition(Node node, BoxPosition posHandle, SizeF offset)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node. |
BoxPosition | posHandle | The position handle. |
System.Drawing.SizeF | offset | The offset. |