Class DrawingService
Represents drawing service.
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class DrawingService : GraphServiceBase, IDrawingService
Constructors
DrawingService(IGraphInternal)
Initializes a new instance of the DrawingService class.
Declaration
public DrawingService(IGraphInternal graph)
Parameters
IGraphInternal
graph
The graph. |
Properties
ActiveShape
Gets the active shape.
Declaration
public IGeometryShape ActiveShape { get; }
Property Value
IGeometryShape
|
Implements
AnchorPoints
Gets the anchor points.
Declaration
public IEnumerable<Point> AnchorPoints { get; }
Property Value
System.Collections.Generic.IEnumerable<System.Windows.Point>
|
Implements
ControlPoints
Gets the control points.
Declaration
public IEnumerable<Point> ControlPoints { get; }
Property Value
System.Collections.Generic.IEnumerable<System.Windows.Point>
|
Implements
IsDrawing
Gets a value indicating whether this instance is drawing.
Declaration
public bool IsDrawing { get; }
Property Value
System.Boolean
|
Implements
Methods
ClearPoints()
Clears the anchor and control points.
Declaration
public void ClearPoints()
Implements
CompleteDraw()
Completes the draw.
Declaration
public virtual void CompleteDraw()
Implements
CreateDrawCommand(IGeometryShape, DrawingState, DrawingState, Boolean, Boolean, DrawingShapeInfo)
Creates the DrawCommand that sets the new state of the Shape or reverts the old state.
Declaration
public DrawCommand CreateDrawCommand(IGeometryShape shape, DrawingState oldState, DrawingState newState, bool isComplete, bool isUndoable, DrawingShapeInfo shapeInfo)
Parameters
IGeometryShape
shape
|
DrawingState
oldState
|
DrawingState
newState
|
System.Boolean
isComplete
|
System.Boolean
isUndoable
|
DrawingShapeInfo
shapeInfo
|
Returns
DrawCommand
|
Implements
CreateHandlesGeometry(Point, Point, FillRule)
Create geometry for the Path Handles in Path Tool.
Declaration
public Geometry CreateHandlesGeometry(Point startPoint, Point endPoint, FillRule fillRule)
Parameters
System.Windows.Point
startPoint
|
System.Windows.Point
endPoint
|
System.Windows.Media.FillRule
fillRule
|
Returns
System.Windows.Media.Geometry
|
Implements
CreateShapeGeometry(IEnumerable<DrawingToolSegment>, DrawingShapeInfo)
Creates Geometry for a shape from a given DrawingToolSegments.
Declaration
public Geometry CreateShapeGeometry(IEnumerable<DrawingToolSegment> segments, DrawingShapeInfo shapeInfo)
Parameters
System.Collections.Generic.IEnumerable<DrawingToolSegment>
segments
|
DrawingShapeInfo
shapeInfo
|
Returns
System.Windows.Media.Geometry
|
Implements
DrawPoints(Nullable<Point>, Nullable<Point>, Boolean)
Draws the points.
Declaration
public virtual bool DrawPoints(Point? anchorPoint, Point? controlPoint, bool isUndoable = false)
Parameters
System.Nullable<System.Windows.Point>
anchorPoint
The anchor point. |
System.Nullable<System.Windows.Point>
controlPoint
The control point. |
System.Boolean
isUndoable
The is undoable. |
Returns
System.Boolean
|
Implements
InitializeDraw(IGeometryShape, String)
Initializes draw action.
Declaration
public virtual void InitializeDraw(IGeometryShape activeShape, string toolName)
Parameters
IGeometryShape
activeShape
The active shape. |
System.String
toolName
The name of the current tool. |
Implements
RemoveLastAnchorPoint()
Removes the last anchor point.
Declaration
public void RemoveLastAnchorPoint()
Implements
RemoveLastControlPoint()
Removes the last control point.
Declaration
public void RemoveLastControlPoint()
Implements
SetState(IGeometryShape, IEnumerable<Point>, IEnumerable<Point>)
Sets the state.
Declaration
public void SetState(IGeometryShape shape, IEnumerable<Point> anchorPoints, IEnumerable<Point> controlPoints)
Parameters
IGeometryShape
shape
The shape. |
System.Collections.Generic.IEnumerable<System.Windows.Point>
anchorPoints
The anchor points. |
System.Collections.Generic.IEnumerable<System.Windows.Point>
controlPoints
The control points. |
Implements
StartDraw()
Events
Drawing
Occurs when drawing.
Declaration
public event EventHandler<DrawingEventArgs> Drawing
Event Type
System.EventHandler<DrawingEventArgs>
|