New to Telerik UI for WinFormsStart a free 30-day trial

Represents a single unit used for drawing a shape with Path or Pencil tools.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public sealed class DrawingToolSegment

Inheritance: objectDrawingToolSegment

Properties

Gets or sets the anchor point1.

C#
public Point AnchorPoint1 { get; }

Gets or sets the anchor point2.

C#
public Point AnchorPoint2 { get; }

Gets or sets the control point1.

C#
public Point ControlPoint1 { get; }

Gets or sets the control point2.

C#
public Point ControlPoint2 { get; }

Gets a value indicating whether this instance is complete.

C#
public bool IsComplete { get; }

Gets a value indicating whether this instance is line.

C#
public bool IsLine { get; }

Methods

Creates this instance.

C#
public static DrawingToolSegment Create()
Returns:

DrawingToolSegment

Creates the specified anchor point1.

C#
public static DrawingToolSegment Create(Point anchorPoint1, Point anchorPoint2, Point controlPoint1, Point controlPoint2)
Parameters:anchorPoint1Point

The anchor point1.

anchorPoint2Point

The anchor point2.

controlPoint1Point

The control point1.

controlPoint2Point

The control point2.

Returns:

DrawingToolSegment

Creates the specified anchor point1.

C#
public static DrawingToolSegment Create(Point anchorPoint1, Point controlPoint1)
Parameters:anchorPoint1Point

The anchor point1.

controlPoint1Point

The control point1.

Returns:

DrawingToolSegment

Gets the bounds.

C#
public Rect GetBounds()
Returns:

Rect

Finds the normalization point of a given set of segments.

C#
public static Point GetNormalizationPoint(IEnumerable<DrawingToolSegment> segments)
Parameters:segmentsIEnumerable<DrawingToolSegment>Returns:

Point

Gets the path segment.

C#
public PathSegment GetPathSegment(Point normalizationPoint)
Parameters:normalizationPointPoint

The normalization point.

Returns:

PathSegment

Creates a collection of segments given a list of anchor and control points.

C#
public static IEnumerable<DrawingToolSegment> GetSegments(IEnumerable<Point> anchorPoints, IEnumerable<Point> controlPoints)
Parameters:anchorPointsIEnumerable<Point>controlPointsIEnumerable<Point>Returns:

IEnumerable<DrawingToolSegment>

Gets the segments rectangle.

C#
public static Rect GetSegmentsRect(IEnumerable<DrawingToolSegment> segments)
Parameters:segmentsIEnumerable<DrawingToolSegment>

The segments.

Returns:

Rect