DrawingToolSegment
Represents a single unit used for drawing a shape with Path or Pencil tools.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public sealed class DrawingToolSegment
Inheritance: objectDrawingToolSegment
Properties
AnchorPoint1
Point
Gets or sets the anchor point1.
public Point AnchorPoint1 { get; }
AnchorPoint2
Point
Gets or sets the anchor point2.
public Point AnchorPoint2 { get; }
ControlPoint1
Point
Gets or sets the control point1.
public Point ControlPoint1 { get; }
ControlPoint2
Point
Gets or sets the control point2.
public Point ControlPoint2 { get; }
Gets a value indicating whether this instance is complete.
public bool IsComplete { get; }
Methods
Creates this instance.
Creates the specified anchor point1.
public static DrawingToolSegment Create(Point anchorPoint1, Point anchorPoint2, Point controlPoint1, Point controlPoint2)
The anchor point1.
anchorPoint2PointThe anchor point2.
controlPoint1PointThe control point1.
controlPoint2PointThe control point2.
Returns:Creates the specified anchor point1.
public static DrawingToolSegment Create(Point anchorPoint1, Point controlPoint1)
The anchor point1.
controlPoint1PointThe control point1.
Returns:GetBounds()
Rect
Gets the bounds.
public Rect GetBounds()
Rect
Finds the normalization point of a given set of segments.
public static Point GetNormalizationPoint(IEnumerable<DrawingToolSegment> segments)
Point
GetPathSegment(Point)
PathSegment
Gets the path segment.
public PathSegment GetPathSegment(Point normalizationPoint)
The normalization point.
Returns:PathSegment
Creates a collection of segments given a list of anchor and control points.
public static IEnumerable<DrawingToolSegment> GetSegments(IEnumerable<Point> anchorPoints, IEnumerable<Point> controlPoints)
Gets the segments rectangle.
public static Rect GetSegmentsRect(IEnumerable<DrawingToolSegment> segments)
The segments.
Returns:Rect