Class ShapeBase
Base class for all shape types. The examples below illustrate how to inherit it when creating custom shapes
Inheritance
Namespace: Telerik.Reporting.Drawing.Shapes
Assembly: Telerik.Reporting.dll
Syntax
public abstract class ShapeBase : IEnumerable<IShapeSegment>, IEnumerable, ICloneable
Constructors
ShapeBase()
Initializes a new instance of the ShapeBase with zero angle of rotation.
Declaration
protected ShapeBase()
ShapeBase(Double)
Initializes a new instance of the ShapeBase with the specified angle of rotation in degrees.
Declaration
protected ShapeBase(double startAngle)
Parameters
System.Double
startAngle
A double value specifying the angle of rotation of the shape in degrees. |
Properties
AngleInRad
Gets the angle of rotation of this shape in radians.
Declaration
protected double AngleInRad { get; }
Property Value
System.Double
A double value representing the angle of rotation of this shape in radians. |
Bounds
Gets or sets the bounds of this shape.
Declaration
public RectangleF Bounds { get; set; }
Property Value
System.Drawing.RectangleF
A System.Drawing.RectangleF structure representing the bounds of this shape. |
StartAngle
Declaration
public double StartAngle { get; set; }
Property Value
System.Double
|
Methods
AddBeziers(PointF[])
Adds a Bezier curve to the shape.
Declaration
public void AddBeziers(PointF[] points)
Parameters
System.Drawing.PointF[]
points
A point array representing the points of the Bezier curve. |
AddEllipse(RectangleF)
Adds an ellipse to the shape.
Declaration
public void AddEllipse(RectangleF bounds)
Parameters
System.Drawing.RectangleF
bounds
The bounding rectangle of the ellipse. |
AddLine(PointF, PointF)
Adds a straight line to the shape.
Declaration
public void AddLine(PointF point1, PointF point2)
Parameters
System.Drawing.PointF
point1
The statr point of the line. |
System.Drawing.PointF
point2
The end point of the line. |
AddLines(PointF[], Boolean)
Adds a series of straight lines to the shape.
Declaration
public void AddLines(PointF[] points, bool close)
Parameters
System.Drawing.PointF[]
points
A point array representing the starting and ending points of the lines. |
System.Boolean
close
A boolean value specifying whether to close the shape. |
Clone()
Declaration
public abstract object Clone()
Returns
System.Object
|
CreateShape()
When overridden this method should create the shape.
Declaration
protected abstract void CreateShape()
GetEnumerator()
Declaration
public IEnumerator GetEnumerator()
Returns
System.Collections.IEnumerator
|
RecreateShape()
Recreates the shape.
Declaration
protected void RecreateShape()