---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/Rectangle-Drawing
---

# Rectangle

## Overview

`Rectangle` is a class in Aspose.PDF FOSS for .NET.
Inherits from: `Shape`.

A rectangle shape in the Drawing namespace (distinct from Aspose.Pdf.Rectangle which is a page rectangle).

This class provides 3 methods for working with Rectangle objects in .NET programs.
Available methods include: `CheckBounds`, `Rectangle`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `Bottom`, `GraphInfo`, `Height`, `Left`, `RoundedCornerRadius`, `Text`, and 1 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Left` | `double` | Read/Write | Gets or sets the left. |
| `Bottom` | `double` | Read/Write | Gets or sets the bottom. |
| `Width` | `double` | Read/Write | Gets or sets the width. |
| `Height` | `double` | Read/Write | Gets or sets the height. |
| `RoundedCornerRadius` | `double` | Read/Write | Corner radius for rounded-rectangle rendering (0 = sharp corners). |
| `GraphInfo` | `Aspose.Pdf.GraphInfo` | Read/Write | Gets or sets the graph info. |
| `Text` | `Aspose.Pdf.Text.TextFragment?` | Read/Write | Optional text label rendered with the shape. |

## Methods

| Signature | Description |
|-----------|-------------|
| `Rectangle(left: double, bottom: double, width: double, height: double)` | Calls Rectangle on this Rectangle instance. |
| `Rectangle(left: float, bottom: float, width: float, height: float)` | Single-precision overload. |
| `CheckBounds(containerWidth: double, containerHeight: double)` | Whether the rectangle lies entirely within an origin-anchored container. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)