• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ShapeBase

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

Inheritance
System.Object
ShapeBase
EllipseShape
LineShape
RoundedCornerShape
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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

Implements
System.ICloneable.Clone()

CreateShape()

When overridden this method should create the shape.

Declaration
protected abstract void CreateShape()

GetEnumerator()

Declaration
public IEnumerator GetEnumerator()
Returns
System.Collections.IEnumerator

Implements
System.Collections.IEnumerable.GetEnumerator()

RecreateShape()

Recreates the shape.

Declaration
protected void RecreateShape()

Explicit Interface Implementations

IEnumerable<IShapeSegment>.GetEnumerator()

Declaration
IEnumerator<IShapeSegment> IEnumerable<IShapeSegment>.GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<IShapeSegment>

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Online Demos
Support Resources
  • Documentation
  • Knowledge Base
  • Videos
  • Reporting Samples Repository
  • Reporting Release History
Community
  • Forums
  • Blogs
  • Reporting Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.