InterfaceIDrawingService
The service handling the drawing of geometry on the surface.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public interface IDrawingService
Properties
ActiveShape
Gets the active shape.
AnchorPoints
Gets the anchor points.
Declaration
IEnumerable<Point> AnchorPoints { get; }
Property Value
IEnumerable<Point>
ControlPoints
Gets the control points.
Declaration
IEnumerable<Point> ControlPoints { get; }
Property Value
IEnumerable<Point>
Methods
CreateDrawCommand(IGeometryShape, DrawingState, DrawingState, bool, bool, DrawingShapeInfo)
Creates the DrawCommand that sets the new state of the Shape or reverts the old state.
Declaration
DrawCommand CreateDrawCommand(IGeometryShape shape, DrawingState oldState, DrawingState newState, bool isComplete, bool isUndoable, DrawingShapeInfo shapeInfo)
Parameters
shape
oldState
newState
isComplete
isUndoable
shapeInfo
Returns
CreateHandlesGeometry(Point, Point, FillRule)
Create geometry for the Path Handles in Path Tool.
Declaration
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
Geometry CreateShapeGeometry(IEnumerable<DrawingToolSegment> segments, DrawingShapeInfo shapeInfo)
Parameters
segments
IEnumerable<DrawingToolSegment>
shapeInfo
Returns
Geometry
DrawPoints(Point?, Point?, bool)
Draws the points.
InitializeDraw(IGeometryShape, string)
Initializes draw action.
Declaration
void InitializeDraw(IGeometryShape activeShape, string toolName)
Parameters
activeShape
The active shape.
toolName
The name of the current tool.
RemoveLastAnchorPoint()
Removes the last anchor point.
Declaration
void RemoveLastAnchorPoint()
RemoveLastControlPoint()
Removes the last control point.
Declaration
void RemoveLastControlPoint()
SetState(IGeometryShape, IEnumerable<Point>, IEnumerable<Point>)
Sets the state.
Declaration
void SetState(IGeometryShape shape, IEnumerable<Point> anchorPoints, IEnumerable<Point> controlPoints)
Parameters
shape
The shape.
anchorPoints
IEnumerable<Point>
The anchor points.
controlPoints
IEnumerable<Point>
The control points.
Events
Drawing
Occurs when drawing.
Declaration
event EventHandler<DrawingEventArgs> Drawing
Event Value