New to Telerik ReportingStart a free 30-day trial

Base class for all shape types. The examples below illustrate how to inherit it when creating custom shapes

Definition

Namespace:Telerik.Reporting.Drawing.Shapes

Assembly:Telerik.Reporting.dll

Syntax:

C#
[TypeConverter(typeof(ExpandableObjectConverter))]
public abstract class ShapeBase

Inheritance: objectShapeBase

Derived Classes: EllipseShapeLineShapeRoundedCornerShape

Constructors

Initializes a new instance of the ShapeBase with zero angle of rotation.

C#
protected ShapeBase()

Initializes a new instance of the ShapeBase with the specified angle of rotation in degrees.

C#
protected ShapeBase(double startAngle)
Parameters:startAngledouble

A double value specifying the angle of rotation of the shape in degrees.

Properties

Gets the angle of rotation of this shape in radians.

C#
protected double AngleInRad { get; }
Property Value:

A double value representing the angle of rotation of this shape in radians.

Bounds

RectangleF

Gets or sets the bounds of this shape.

C#
[Browsable(false)]
public RectangleF Bounds { get; set; }
Property Value:

A RectangleF structure representing the bounds of this shape.

TODO: Add documentation.

C#
public double StartAngle { get; set; }

Methods

Adds a Bezier curve to the shape.

C#
public void AddBeziers(PointF[] points)
Parameters:pointsPointF[]

A point array representing the points of the Bezier curve.

Adds an ellipse to the shape.

C#
public void AddEllipse(RectangleF bounds)
Parameters:boundsRectangleF

The bounding rectangle of the ellipse.

Adds a straight line to the shape.

C#
public void AddLine(PointF point1, PointF point2)
Parameters:point1PointF

The statr point of the line.

point2PointF

The end point of the line.

Adds a series of straight lines to the shape.

C#
public void AddLines(PointF[] points, bool close)
Parameters:pointsPointF[]

A point array representing the starting and ending points of the lines.

closebool

A boolean value specifying whether to close the shape.

Clone()

object

TODO: Add documentation.

C#
public abstract object Clone()
Returns:

object

When overridden this method should create the shape.

C#
protected abstract void CreateShape()

GetEnumerator()

IEnumerator

Internal use only

C#
public IEnumerator GetEnumerator()
Returns:

IEnumerator

Recreates the shape.

C#
protected void RecreateShape()