New to Telerik UI for WinFormsStart a free 30-day trial

The service handling the drawing of geometry on the surface.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public interface IDrawingService

Derived Classes: DrawingService

Properties

Gets the active shape.

C#
IGeometryShape ActiveShape { get; }

AnchorPoints

IEnumerable<Point>

Gets the anchor points.

C#
IEnumerable<Point> AnchorPoints { get; }

ControlPoints

IEnumerable<Point>

Gets the control points.

C#
IEnumerable<Point> ControlPoints { get; }

Gets a value indicating whether this instance is drawing.

C#
bool IsDrawing { get; }

Methods

Clears the points.

C#
void ClearPoints()

Completes the draw.

C#
void CompleteDraw()

Creates the DrawCommand that sets the new state of the Shape or reverts the old state.

C#
DrawCommand CreateDrawCommand(IGeometryShape shape, DrawingState oldState, DrawingState newState, bool isComplete, bool isUndoable, DrawingShapeInfo shapeInfo)
Parameters:shapeIGeometryShapeoldStateDrawingStatenewStateDrawingStateisCompleteboolisUndoableboolshapeInfoDrawingShapeInfoReturns:

DrawCommand

Create geometry for the Path Handles in Path Tool.

C#
Geometry CreateHandlesGeometry(Point startPoint, Point endPoint, FillRule fillRule)
Parameters:startPointPointendPointPointfillRuleFillRuleReturns:

Geometry

Creates Geometry for a shape from a given DrawingToolSegments.

C#
Geometry CreateShapeGeometry(IEnumerable<DrawingToolSegment> segments, DrawingShapeInfo shapeInfo)
Parameters:segmentsIEnumerable<DrawingToolSegment>shapeInfoDrawingShapeInfoReturns:

Geometry

Draws the points.

C#
bool DrawPoints(Point? anchorPoint, Point? controlPoint, bool isUndoable = false)
Parameters:anchorPointPoint?

The anchor point.

controlPointPoint?

The control point.

isUndoablebool

The is undoable.

Returns:

bool

Initializes draw action.

C#
void InitializeDraw(IGeometryShape activeShape, string toolName)
Parameters:activeShapeIGeometryShape

The active shape.

toolNamestring

The name of the current tool.

Removes the last anchor point.

C#
void RemoveLastAnchorPoint()

Removes the last control point.

C#
void RemoveLastControlPoint()

Sets the state.

C#
void SetState(IGeometryShape shape, IEnumerable<Point> anchorPoints, IEnumerable<Point> controlPoints)
Parameters:shapeIGeometryShape

The shape.

anchorPointsIEnumerable<Point>

The anchor points.

controlPointsIEnumerable<Point>

The control points.

Starts the draw.

C#
void StartDraw()

Events

Occurs when drawing.

C#
event EventHandler<DrawingEventArgs> Drawing