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 Drawing
Declaration
public DrawingService(IGraphInternal graph)
Parameters
IGraph The graph. |
Properties
ActiveShape
Gets the active shape.
Declaration
public IGeometryShape ActiveShape { get; }
Property Value
Implements
AnchorPoints
Gets the anchor points.
Declaration
public IEnumerable<Point> AnchorPoints { get; }
Property Value
System.
|
Implements
ControlPoints
Gets the control points.
Declaration
public IEnumerable<Point> ControlPoints { get; }
Property Value
System.
|
Implements
IsDrawing
Gets a value indicating whether this instance is drawing.
Declaration
public bool IsDrawing { get; }
Property Value
System.
|
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
IGeometry
|
Drawing
|
Drawing
|
System.
|
System.
|
Drawing
|
Returns
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.
|
System.
|
System.
|
Returns
System.
|
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.
|
Drawing
|
Returns
System.
|
Implements
DrawPoints(Nullable<Point>, Nullable<Point>, Boolean)
Draws the points.
Declaration
public virtual bool DrawPoints(Nullable<Point> anchorPoint, Nullable<Point> controlPoint, bool isUndoable = false)
Parameters
System. The anchor point. |
System. The control point. |
System. The is undoable. |
Returns
System.
|
Implements
InitializeDraw(IGeometryShape, String)
Initializes draw action.
Declaration
public virtual void InitializeDraw(IGeometryShape activeShape, string toolName)
Parameters
IGeometry The active shape. |
System. 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
IGeometry The shape. |
System. The anchor points. |
System. The control points. |
Implements
StartDraw()
Events
Drawing
Occurs when drawing.
Declaration
public event EventHandler<DrawingEventArgs> Drawing
Event Type
System.
|