New to Telerik UI for .NET MAUIStart a free 30-day trial

Defines an arc segment for a path figure, allowing you to draw elliptical arcs within a bounding box. The arc is specified by its center point, size, start angle, and sweep angle, all relative to the containing geometry. This segment enables the creation of circular or elliptical arcs with customizable orientation and sweep direction, making it suitable for advanced vector graphics scenarios such as pie charts, gauges, or custom shapes.

Definition

Constructors

Initializes a new instance of the arc segment.

C#
public RadArcSegment()

Initializes a new instance of the arc segment.

C#
public RadArcSegment(Point center, Size size, double startAngle, double sweepAngle)
Parameters:centerPoint

Specifies the center point of the arc segment. The point coordinates are relative to the containing geometry's bounding box, where (0, 0) is the bottom-left corner and (1, 1) is the top-right corner.

sizeSize

Specifies the size of the arc segment. The width and height are values between 0 and 1, relative to the containing geometry's bounding box.

startAngledouble

Specifies the start angle of the arc segment in the cartesian coordinate system, where 0 points to the right and 90 points up. This value is measured in degrees, where 360 represents a full circle.

sweepAngledouble

Specifies the sweep angle of the arc segment with positive values indicating a counter-clockwise direction. This value is measured in degrees, where 360 represents a full circle.

Example:
csharp
// Create an arc segment that draws a quarter circle in the top-right quadrant
var arcSegment = new RadArcSegment(
    center: new Point(0.5, 0.5),    // Center of the bounding box
    size: new Size(0.4, 0.4),       // 40% of the bounding box size
    startAngle: 0,                   // Start at 0 degrees (right side)
    sweepAngle: 90                   // Sweep 90 degrees counter-clockwise
);

Properties

Center

Point

Gets or sets the center point of the arc segment. The point coordinates are relative to the containing geometry's bounding box, where (0, 0) is the bottom-left corner and (1, 1) is the top-right corner.

C#
public Point Center { get; set; }
Example:
csharp
// Set the center of an arc segment to the middle of the bounding box
var arcSegment = new RadArcSegment();
arcSegment.Center = new Point(0.5, 0.5);  // Center point

// Create an arc in the bottom-left quadrant
arcSegment.Center = new Point(0.25, 0.25);

Size

Size

Gets or sets the size of the arc segment. The width and height are values between 0 and 1, relative to the containing geometry's bounding box.

C#
[TypeConverter(typeof(SizeTypeConverter))]
public Size Size { get; set; }
Example:
csharp
// Set the size of an arc segment to half the bounding box dimensions
var arcSegment = new RadArcSegment();
arcSegment.Size = new Size(0.5, 0.5);  // 50% width and height

// Create a small arc segment 
arcSegment.Size = new Size(0.2, 0.3);  // 20% width, 30% height

// Create a large arc that spans most of the bounding box
arcSegment.Size = new Size(0.8, 0.8);  // 80% width and height

Gets or sets the start angle of the arc segment in the cartesian coordinate system, where 0 points to the right and 90 points up. This value is measured in degrees, where 360 represents a full circle.

C#
public double StartAngle { get; set; }
Example:
csharp
// Create an arc segment starting from the right side (0 degrees)
var arcSegment = new RadArcSegment();
arcSegment.StartAngle = 0;    // Start at right side

// Create an arc starting from the top (90 degrees)
arcSegment.StartAngle = 90;   // Start at top

// Create an arc starting from the left side (180 degrees)
arcSegment.StartAngle = 180;  // Start at left side

// Create an arc starting from the bottom (270 degrees)
arcSegment.StartAngle = 270;  // Start at bottom

Gets or sets the sweep angle of the arc segment with positive values indicating a counter-clockwise direction. This value is measured in degrees, where 360 represents a full circle.

C#
public double SweepAngle { get; set; }
Example:
csharp
// Create an arc segment with a 90-degree sweep (quarter circle)
var arcSegment = new RadArcSegment();
arcSegment.SweepAngle = 90;   // Quarter circle counter-clockwise

// Create a semicircle
arcSegment.SweepAngle = 180;  // Half circle counter-clockwise

// Create a clockwise arc (negative sweep angle)
arcSegment.SweepAngle = -90;  // Quarter circle clockwise