Class PolyLineBase
The Poly Line Base is used to implement the actions to create a graphical representation object of polyline shape in Diagram control.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public abstract class PolyLineBase : UITool, IDisposable
Constructors
PolyLineBase(DiagramController, String)
Initializes a new instance of the PolyLineBase class.
Declaration
public PolyLineBase(DiagramController controller, string name)
Parameters
Type | Name | Description |
---|---|---|
DiagramController | controller | The controller. |
System.String | name | The name. |
Fields
c_nMIN_NODE_POINTS
Defines minimum points length needed to successfully create Polyline derived node.
Declaration
protected const int c_nMIN_NODE_POINTS = 2
Field Value
Type |
---|
System.Int32 |
Properties
HeadDecorator
Gets or sets Head Decorator applied to created node.
Declaration
public HeadDecorator HeadDecorator { get; set; }
Property Value
Type |
---|
HeadDecorator |
Points
Gets or sets the points.
Declaration
protected PointF[] Points { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.PointF[] | The points. |
RenderingHelper
Gets helper node used to render tool state.
Declaration
protected Node RenderingHelper { get; }
Property Value
Type |
---|
Node |
TailDecorator
Gets or sets Tail Decorator applied to created node.
Declaration
public TailDecorator TailDecorator { get; set; }
Property Value
Type |
---|
TailDecorator |
Methods
Abort()
Aborts tool actions.
Declaration
public override Tool Abort()
Returns
Type | Description |
---|---|
Tool | The tool to abort. |
Overrides
AddPoint()
Adds CurrentPoint to array of points defining polyline derived node's shape.
Declaration
protected void AddPoint()
CanCompleteAction(MouseEventArgs)
Determines whether this can complete action.
Declaration
protected virtual bool CanCompleteAction(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CheckConnectionPossibility(PointF, out Boolean, Boolean)
Checks for connection possibility.
Declaration
protected ConnectionPoint CheckConnectionPossibility(PointF ptTest, out bool canConnectWithPort, bool endPoint)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptTest | The point. |
System.Boolean | canConnectWithPort | true, if the port can accept connection |
System.Boolean | endPoint |
Returns
Type | Description |
---|---|
ConnectionPoint | The connection point |
CompleteAction(PointF[])
Completes Tool Action. Creates specific node and inserts it into document.
Declaration
protected virtual Node CompleteAction(PointF[] ptsShape)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | ptsShape | points to create polyline derived node from |
Returns
Type | Description |
---|---|
Node | The node. |
CreateNode(PointF[])
Creates Polyline derived node.
Declaration
protected abstract Node CreateNode(PointF[] pts)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | points to create polyline derived node from. |
Returns
Type | Description |
---|---|
Node | The node |
CreatePath(PointF[])
Creates Node's GraphicsPath from given points.
Declaration
protected abstract GraphicsPath CreatePath(PointF[] pts)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | points to create path from |
Returns
Type | Description |
---|---|
System.Drawing.Drawing2D.GraphicsPath | path created from given points |
Dispose()
Declaration
public override void Dispose()
Overrides
Draw(Graphics)
Draws the specified graphics.
Declaration
public override void Draw(Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Overrides
GetLastPathPointPosition()
Get the last path point position in model coordinates.
Declaration
protected virtual Point GetLastPathPointPosition()
Returns
Type | Description |
---|---|
System.Drawing.Point | Point in model coordinates. |
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
ProcessDoubleClick(MouseEventArgs)
Processes the double click.
Declaration
public override Tool ProcessDoubleClick(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
ProcessMouseDown(MouseEventArgs)
Declaration
public override Tool ProcessMouseDown(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs |
Returns
Type |
---|
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 poly line tool. |
Overrides
SetDecorator(LineBase)
Copies Tool Decorators settings to created node's decorators.
Declaration
protected void SetDecorator(LineBase lineBase)
Parameters
Type | Name | Description |
---|---|---|
LineBase | lineBase | Poly line base |
UpdateHelperNode()
Update the move action.
Declaration
protected void UpdateHelperNode()
UpdateWorkRect()
Updates the work rect.
Declaration
protected void UpdateWorkRect()