# Object Methods

## `.rotate(angle)`&#x20;

Rotates an Easy Draw object by a specified amount of degrees. &#x20;

Positive numbers rotate the shape clockwise (to the right).  Negative numbers rotate the shape counter-clockwise (to the left).

Example:

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

**Unsupported objects:**  Image

## `.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

## Others

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

{% content-ref url="/pages/-MRAvKSob\_wbDI1gz9NW" %}
[Property Getting and Setting](/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](/python/module-reference/event-handling.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://easy-draw.joemazzone.net/python/module-reference/object-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
