> For the complete documentation index, see [llms.txt](https://easy-draw.joemazzone.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easy-draw.joemazzone.net/python/module-reference/object-methods.md). Agents can also search and read this documentation through its [MCP server](https://easy-draw.joemazzone.net/~gitbook/mcp).

# Object Methods

## `.rotate(angle)`

Rotates an Easy Draw object by a specified amount of degrees around its center.

Positive numbers rotate the shape clockwise (to the right). Negative numbers rotate the shape counter-clockwise (to the left). This is the same for every object, including `Arc` and `Text`.

Example:

```python
rect1.rotate(45)
```

A `Rectangle` can also rotate around its top-left corner instead of its center:

```python
rect1.rotate(45, from_top_left = True)
```

The `angle` property tells you how far an object has been rotated in total.

```python
print(rect1.angle)
```

**Unsupported objects:** None

## `.erase()`

Deletes the object from the canvas. Once erased, an object can no longer be referenced.

Example:

```python
rect1.erase()
```

**Unsupported objects:** None

## `.to_string()`

Returns the string representation of the object. The string will include the object type and ID number used by Easy Draw.

Example:

```python
print(rect1.to_string())
```

**Unsupported objects:** None

## The `Shape` Parent Class

Every Easy Draw drawing object (`Rectangle`, `Circle`, `Text`, `Image`, and the rest) is a child class of `Shape`. That is why they all share the methods on this page.

```python
print(isinstance(rect1, easy_draw.Shape))    # True
```

## Others

For information on the `.set_property()` method see:

{% content-ref url="/pages/-MRAvKSob\_wbDI1gz9NW" %}
[Property Getting and Setting](https://easy-draw.joemazzone.net/python/module-reference/property-getters-and-setters.md)
{% endcontent-ref %}

For information on the `.event_setup()` method see:

{% content-ref url="/pages/-MRAvSb83fmXckFG2fA6" %}
[Event Handling](https://easy-draw.joemazzone.net/python/module-reference/event-handling.md)
{% endcontent-ref %}
