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

# DrawingRectangle

## Overview

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

A rectangle shape.

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

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `X` | `double` | Read/Write | Gets or sets the x. |
| `Y` | `double` | Read/Write | Gets or sets the y. |
| `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 rectangles. |
| `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 |
|-----------|-------------|
| `DrawingRectangle(x: double, y: double, width: double, height: double)` | Calls DrawingRectangle on this DrawingRectangle instance. |
| `CheckBounds(containerWidth: double, containerHeight: double)` | Whether this shape lies within a containerWidth×containerHeight box anchored at the origin. |

## See Also

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