Interface
IDrawingService

The service handling the drawing of geometry on the surface.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public interface IDrawingService

Properties

ActiveShape

Gets the active shape.

Declaration

cs-api-definition
IGeometryShape ActiveShape { get; }

Property Value

IGeometryShape

AnchorPoints

Gets the anchor points.

Declaration

cs-api-definition
IEnumerable<Point> AnchorPoints { get; }

Property Value

IEnumerable<Point>

ControlPoints

Gets the control points.

Declaration

cs-api-definition
IEnumerable<Point> ControlPoints { get; }

Property Value

IEnumerable<Point>

IsDrawing

Gets a value indicating whether this instance is drawing.

Declaration

cs-api-definition
bool IsDrawing { get; }

Property Value

bool

Methods

ClearPoints()

Clears the points.

Declaration

cs-api-definition
void ClearPoints()

CompleteDraw()

Completes the draw.

Declaration

cs-api-definition
void CompleteDraw()

CreateDrawCommand(IGeometryShape, DrawingState, DrawingState, bool, bool, DrawingShapeInfo)

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

Declaration

cs-api-definition
DrawCommand CreateDrawCommand(IGeometryShape shape, DrawingState oldState, DrawingState newState, bool isComplete, bool isUndoable, DrawingShapeInfo shapeInfo)

Parameters

shape

IGeometryShape

oldState

DrawingState

newState

DrawingState

isComplete

bool

isUndoable

bool

shapeInfo

DrawingShapeInfo

Returns

DrawCommand

CreateHandlesGeometry(Point, Point, FillRule)

Create geometry for the Path Handles in Path Tool.

Declaration

cs-api-definition
Geometry CreateHandlesGeometry(Point startPoint, Point endPoint, FillRule fillRule)

Parameters

startPoint

Point

endPoint

Point

fillRule

FillRule

Returns

Geometry

CreateShapeGeometry(IEnumerable<DrawingToolSegment>, DrawingShapeInfo)

Creates Geometry for a shape from a given DrawingToolSegments.

Declaration

cs-api-definition
Geometry CreateShapeGeometry(IEnumerable<DrawingToolSegment> segments, DrawingShapeInfo shapeInfo)

Parameters

segments

IEnumerable<DrawingToolSegment>

shapeInfo

DrawingShapeInfo

Returns

Geometry

DrawPoints(Point?, Point?, bool)

Draws the points.

Declaration

cs-api-definition
bool DrawPoints(Point? anchorPoint, Point? controlPoint, bool isUndoable = false)

Parameters

anchorPoint

Point?

The anchor point.

controlPoint

Point?

The control point.

isUndoable

bool

The is undoable.

Returns

bool

InitializeDraw(IGeometryShape, string)

Initializes draw action.

Declaration

cs-api-definition
void InitializeDraw(IGeometryShape activeShape, string toolName)

Parameters

activeShape

IGeometryShape

The active shape.

toolName

string

The name of the current tool.

RemoveLastAnchorPoint()

Removes the last anchor point.

Declaration

cs-api-definition
void RemoveLastAnchorPoint()

RemoveLastControlPoint()

Removes the last control point.

Declaration

cs-api-definition
void RemoveLastControlPoint()

SetState(IGeometryShape, IEnumerable<Point>, IEnumerable<Point>)

Sets the state.

Declaration

cs-api-definition
void SetState(IGeometryShape shape, IEnumerable<Point> anchorPoints, IEnumerable<Point> controlPoints)

Parameters

shape

IGeometryShape

The shape.

anchorPoints

IEnumerable<Point>

The anchor points.

controlPoints

IEnumerable<Point>

The control points.

StartDraw()

Starts the draw.

Declaration

cs-api-definition
void StartDraw()

Events

Drawing

Occurs when drawing.

Declaration

cs-api-definition
event EventHandler<DrawingEventArgs> Drawing

Event Value

EventHandler<DrawingEventArgs>