## Rectangle structure

Stores a set of four integers that represent the location and size of a rectangle.

```csharp
public struct Rectangle
```

## Constructors

| Name | Description |
| --- | --- |
| [Rectangle](rectangle)(int, int, int, int) | Initializes a new instance of the [`Rectangle`](../rectangle) structure with the specified location and size. |

## Properties

| Name | Description |
| --- | --- |
| static [Empty](../../aspose.ocr/rectangle/empty) { get; } | Gets a new instance of the [`Rectangle`](../rectangle) structure that has [`X`](./x), [`Y`](./y), [`Width`](./width) and [`Height`](./height) values set to zero. |
| [Bottom](../../aspose.ocr/rectangle/bottom) { get; set; } | Gets or sets the y-coordinate that is the sum of the [`Y`](./y) and [`Height`](./height) property values of this [`Rectangle`](../rectangle) structure. |
| [IsEmpty](../../aspose.ocr/rectangle/isempty) { get; } | Gets a value indicating whether all numeric properties of this [`Rectangle`](../rectangle) have values of zero. |
| [Left](../../aspose.ocr/rectangle/left) { get; set; } | Gets or sets the x-coordinate of the left edge of this [`Rectangle`](../rectangle) structure. |
| [Right](../../aspose.ocr/rectangle/right) { get; set; } | Gets or sets the x-coordinate that is the sum of [`X`](./x) and [`Width`](./width) property values of this [`Rectangle`](../rectangle) structure. |
| [Top](../../aspose.ocr/rectangle/top) { get; set; } | Gets or sets the y-coordinate of the top edge of this [`Rectangle`](../rectangle) structure. |

## Methods

| Name | Description |
| --- | --- |
| [Contains](../../aspose.ocr/rectangle/contains)(int, int) | Determines if the specified point is contained within this [`Rectangle`](../rectangle) structure. |
| override [Equals](../../aspose.ocr/rectangle/equals)(object) | Tests whether *obj* is a [`Rectangle`](../rectangle) structure with the same location and size of this [`Rectangle`](../rectangle) structure. |
| override [GetHashCode](../../aspose.ocr/rectangle/gethashcode)() | Returns the hash code for this [`Rectangle`](../rectangle) structure. |
| override [ToString](../../aspose.ocr/rectangle/tostring)() | Converts the attributes of this [`Rectangle`](../rectangle) to a human-readable string. |
| [operator ==](../../aspose.ocr/rectangle/op_equality) | Tests whether two [`Rectangle`](../rectangle) structures have equal location and size. |
| [operator !=](../../aspose.ocr/rectangle/op_inequality) | Tests whether two [`Rectangle`](../rectangle) structures differ in location or size. |

## Fields

| Name | Description |
| --- | --- |
| [Height](../../aspose.ocr/rectangle/height) | The rectangle width. |
| [Width](../../aspose.ocr/rectangle/width) | The rectangle height. |
| [X](../../aspose.ocr/rectangle/x) | The rectangle x location. |
| [Y](../../aspose.ocr/rectangle/y) | The rectangle y location. |

### See Also

* namespace [Aspose.OCR](../../aspose.ocr)
* assembly [Aspose.OCR](../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.OCR.dll -->
