---
Product: psd
Platform: python
Page Type: reference
Canonical URL: https://reference.aspose.org/psd/python/rectanglef
---

# RectangleF

## Overview

`RectangleF` is a class in Aspose.PSD FOSS for Python.

Stores a set of four floating-point numbers that represent the location and size of a rectangle.

This class declares 6 methods for RectangleF objects in Python programs.
Available methods include: `__eq__`, `__hash__`, `__init__`, `__ne__`, `__str__`, `empty`.
Public members are accessible to any Python application after installing the Aspose.PSD FOSS for Python package.
Properties: `Height`, `Width`, `X`, `Y`, `bottom`, `height`, and 7 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `X` | `float` | Read/Write | Gets or sets the x-coordinate of the upper‑left corner. |
| `Y` | `float` | Read/Write | Gets or sets the y-coordinate of the upper‑left corner. |
| `Width` | `float` | Read/Write | Gets or sets the width of the rectangle. |
| `Height` | `float` | Read/Write | Gets or sets the height of the rectangle. |
| `bottom` | `float` | Read | Gets the y-coordinate of the bottom edge of this RectangleF. |
| `is_empty` | `bool` | Read | Gets a value indicating whether this RectangleF has no location or size. |
| `left` | `float` | Read | Gets the x-coordinate of the left edge of this RectangleF. |
| `right` | `float` | Read | Gets the x-coordinate of the right edge of this RectangleF. |
| `top` | `float` | Read | Gets the y-coordinate of the top edge of this RectangleF. |
| `x` | - | Read | Gets the x. |
| `y` | - | Read | Gets the y. |
| `width` | - | Read | Gets the width. |
| `height` | - | Read | Gets the height. |

## Methods

| Signature | Description |
|-----------|-------------|
| `__init__(x: float, y: float, width: float, height: float)` | Calls __init__(x, y, width, height) on this RectangleF instance. |
| `__eq__(other: Any)` → `bool` | Determines whether the specified rectangle is equal to this rectangle. |
| `__ne__(other: Any)` → `bool` | Determines whether two rectangles are not equal. |
| `__hash__()` → `int` | Returns a hash code for this rectangle. |
| `__str__()` → `str` | Returns a compact coordinate representation. |
| `empty()` → `"RectangleF"` | Represents a RectangleF structure with its properties left uninitialized. |

## See Also

- [Aspose.PSD for Python — Enterprise API Reference](https://reference.aspose.com/psd/python-net/)