Class UserHandleRenderer
Base class for custom handle renderers
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public abstract class UserHandleRenderer
Constructors
UserHandleRenderer()
Declaration
protected UserHandleRenderer()
Fields
m_handleColor
Handle color.
Declaration
protected Color m_handleColor
Field Value
Type |
---|
System.Drawing.Color |
m_handleDisabledColor
Handle disabled color.
Declaration
protected Color m_handleDisabledColor
Field Value
Type |
---|
System.Drawing.Color |
m_handleOutlineColor
Handle outline color.
Declaration
protected Color m_handleOutlineColor
Field Value
Type |
---|
System.Drawing.Color |
Properties
HandleColor
Gets or sets the color of the handle.
Declaration
public Color HandleColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The color of the handle. |
HandleDisabledColor
Gets or sets the color of the handle disabled.
Declaration
public Color HandleDisabledColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The color of the handle disabled. |
HandleOutlineColor
Gets or sets the color of the handle outline.
Declaration
public Color HandleOutlineColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The color of the handle outline. |
Methods
CreateRotationHandleShape(PointF, SizeF)
Method creates and returns GraphicsPath that represents rotation handle Override this method to change rotationhandle appearance
Declaration
public virtual GraphicsPath CreateRotationHandleShape(PointF location, SizeF handleSize)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | location | Location of rotation handle |
System.Drawing.SizeF | handleSize | size of rotation handle |
Returns
Type | Description |
---|---|
System.Drawing.Drawing2D.GraphicsPath | The graphics path. |
Dispose()
Declaration
public void Dispose()
DrawEndPoint(Graphics, EndPoint, PointF)
Draw endPoint handle in specific position.
Declaration
public virtual void DrawEndPoint(Graphics gfx, EndPoint endPoint, PointF ptPosition)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
EndPoint | endPoint | EndPoint handle. |
System.Drawing.PointF | ptPosition | EndPoint position. |
DrawEndPoints(Graphics, Node)
Draws the end points. Override this method to change appearance and positioning of endpoint.
Declaration
public virtual void DrawEndPoints(Graphics gfx, Node endPointContainer)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Node | endPointContainer | The end point container. |
DrawPinPoint(Graphics, Node)
Draws the pin point. Override this method to change appearance and positioning of pinpoint.
Declaration
public void DrawPinPoint(Graphics gfx, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
Node | node | The node. |
DrawRotationHandle(Graphics, Node)
Draws the rotation handle.
Declaration
public virtual void DrawRotationHandle(Graphics gfx, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
Node | node | The node. |
DrawSelectionHandles(Graphics, Node)
Renders selection/resize handles. Override this method to change appearance and positioning of selection/resize handles.
Declaration
public virtual void DrawSelectionHandles(Graphics gfx, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
Node | node | The node. |
DrawSelectionHandles(Graphics, Node, Boolean)
Renders selection/resize handles. Override this method to change appearance and positioning of selection/resize handles.
Declaration
public virtual void DrawSelectionHandles(Graphics gfx, Node node, bool bWithoutRotation)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
Node | node | The node. |
System.Boolean | bWithoutRotation | if set to |
DrawSelectionHandles(Graphics, Node, RectangleF, Matrix, Boolean)
Renders selection/resize handles. Override this method to change appearance and positioning of selection/resize handles.
Declaration
public virtual void DrawSelectionHandles(Graphics gfx, Node node, RectangleF rcBoundary, Matrix mtxTransform, bool bWithoutRotation)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
Node | node | The node. |
System.Drawing.RectangleF | rcBoundary | Rectangle which has all node elements (ports, labels, etc). |
System.Drawing.Drawing2D.Matrix | mtxTransform | Transformation matrix |
System.Boolean | bWithoutRotation | if set to |
DrawVertexHandles(Graphics, PathNode)
Draws the vertex handles.
Declaration
public virtual void DrawVertexHandles(Graphics gfx, PathNode node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
PathNode | node | The node. |
Enabled(BoxPosition, Node)
Checks if the specified handle is enabled.
Declaration
public static bool Enabled(BoxPosition handle, Node node)
Parameters
Type | Name | Description |
---|---|---|
BoxPosition | handle | The handle. |
Node | node | The shape. |
Returns
Type | Description |
---|---|
System.Boolean | true, if handle is enabled. |
GetBoundingRect(NodeCollection)
Gets the bounding rect.
Declaration
public virtual Rectangle GetBoundingRect(NodeCollection nodes)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | nodes | The nodes. |
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | The rect. |
GetHandlePosition(BoxPosition, Node)
Gets the handle position.
Declaration
public virtual PointF GetHandlePosition(BoxPosition handle, Node node)
Parameters
Type | Name | Description |
---|---|---|
BoxPosition | handle | The handle. |
Node | node | The node. |
Returns
Type | Description |
---|---|
System.Drawing.PointF | The point. |
OnDrawEndPointOutline(Graphics, RectangleF, EndPoint)
Draws endpoint outline and background. Override this method to change endpoint outline and background.
Declaration
public virtual void OnDrawEndPointOutline(Graphics gfx, RectangleF rectHandle, EndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
System.Drawing.RectangleF | rectHandle | The rect handle. |
EndPoint | endpoint | The endpoint. |
OnDrawHeadInterior(Graphics, RectangleF)
Draws head endpoint interior. Override this method to change interior.
Declaration
public virtual void OnDrawHeadInterior(Graphics gfx, RectangleF rectBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
System.Drawing.RectangleF | rectBounds | The rect bounds. |
OnDrawOutlineRectangle(Graphics, SizeF)
Renders outlining rectangle. Override this method to change appearance of outline
Declaration
public virtual void OnDrawOutlineRectangle(Graphics gfx, SizeF size)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Target Graphics |
System.Drawing.SizeF | size | size of outlining rectangle |
OnDrawPinPointShape(Graphics, Node)
Renders PinPoint shape. Override this method to change appearance of pinpoint.
Declaration
public virtual void OnDrawPinPointShape(Graphics gfx, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Node | node | The node. |
OnDrawResizeHandles(Graphics, Node, RectangleF, Matrix, Single)
Renders resize handle. Override this method to change appearance of resize handle.
Declaration
public virtual void OnDrawResizeHandles(Graphics gfx, Node node, RectangleF rcBoundary, Matrix matrixTransform, float fParentsRotation)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Node | node | The node. |
System.Drawing.RectangleF | rcBoundary | The node bounding rectangle. |
System.Drawing.Drawing2D.Matrix | matrixTransform | Transformation matrix. |
System.Single | fParentsRotation | if set to |
OnDrawResizeHandleShape(Graphics, BoxPosition, Node, RectangleF)
Renders resize handle. Override this method to change appearance of resize handle.
Declaration
public virtual void OnDrawResizeHandleShape(Graphics gfx, BoxPosition handle, Node node, RectangleF rectHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Target Graphics |
BoxPosition | handle | The handle. |
Node | node | The node. |
System.Drawing.RectangleF | rectHandle | The handle bounds. |
OnDrawRotationHandleInterior(Graphics, Node)
Draws the pin point interior itself.
Declaration
public virtual void OnDrawRotationHandleInterior(Graphics gfx, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
Node | node | The node. |
OnDrawSegmentOutline(Graphics, PointF[])
Renders segment outlining. Override this method to change appearance of segment outline
Declaration
public virtual void OnDrawSegmentOutline(Graphics gfx, PointF[] pathPoints)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Target Graphics |
System.Drawing.PointF[] | pathPoints | The segment path points. |
OnDrawTailInterior(Graphics, RectangleF)
Draws tail endpoint interior. Override this method to change interior.
Declaration
public virtual void OnDrawTailInterior(Graphics gfx, RectangleF rectBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
System.Drawing.RectangleF | rectBounds | The rect bounds. |
OnDrawVertexHandleShape(Graphics, Brush, Pen, PointF)
Called when needs to draw vertex handle shape.
Declaration
public virtual void OnDrawVertexHandleShape(Graphics gfx, Brush brushVertextFill, Pen penVertexOutline, PointF ptHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
System.Drawing.Brush | brushVertextFill | The brush vertext fill. |
System.Drawing.Pen | penVertexOutline | The pen vertex outline. |
System.Drawing.PointF | ptHandle | The handle position in. |
OutlineBoundingRectangle(Graphics, Node)
This method renders outlining rectangle for given node. Override this method to change appearance and positioning of outline.
Declaration
public virtual void OutlineBoundingRectangle(Graphics gfx, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Node | node | The node. |
OutlineBoundingRectangle(Graphics, Node, Boolean)
This method renders outlining rectangle for given node. Override this method to change appearance and positioning of outline.
Declaration
public virtual void OutlineBoundingRectangle(Graphics gfx, Node node, bool bWithoutRotation)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Node | node | The node. |
System.Boolean | bWithoutRotation | if set to |
OutlineBoundingRectangle(Graphics, RectangleF, Matrix)
This method renders outlining rectangle for given node. Override this method to change appearance and positioning of outline.
Declaration
public virtual void OutlineBoundingRectangle(Graphics gfx, RectangleF rcBoundingRectangle, Matrix mtxTransfrom)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
System.Drawing.RectangleF | rcBoundingRectangle | Rectangle which has all node elements (ports, labels, etc). |
System.Drawing.Drawing2D.Matrix | mtxTransfrom | Transformation matrix. |
OutlineSegmentsLine(Graphics, PathNode)
Outlines the segments line. Override this method to change appearance and positioning of outline.
Declaration
public virtual void OutlineSegmentsLine(Graphics gfx, PathNode node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
PathNode | node | The node. |
Render(Graphics, HandleEditMode, Node)
General rendering method. Override this method to fully change handles rendering.
Declaration
public virtual void Render(Graphics grfx, HandleEditMode handleEditMode, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | grfx | Graphics to draw on. |
HandleEditMode | handleEditMode | The handle edit mode. |
Node | node | The node. |