> 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/the-drawing-canvas.md).

# The Drawing Canvas

All shapes will be drawn on a canvas.

The Easy Draw canvas is 600 x 600 pixels (600 pixels wide by 600 pixels tall).  So (300, 300) is the middle of the canvas, and (600, 600) is the bottom-right corner.

The coordinate system origin (0, 0) is the top-left corner of the canvas. &#x20;

As x increases, objects move right.   As y increases, objects move down (not up!).

![](/files/-MRT-Gv1H7yZTFGl5LLU)

## Loading the Canvas

`load_canvas()`

Load canvas has one optional argument - `background`.   The background property allows you to identify a color value for the canvas on load.&#x20;

Example:

```python
easy_draw.load_canvas(background = (255, 0, 0))
```

## **Changing the Background Color** &#x20;

`set_canvas_color(color)`

Used to change the canvas background color at any point in the program.

Example:

```python
easy_draw.set_canvas_color(color = (0, 0, 255))
```

## Ending the Program

`end()`

Every Easy Draw program must end with this function call.  It sets up the event loop and allows the window to remain open on the desktop.

```python
easy_draw.end()
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://easy-draw.joemazzone.net/python/module-reference/the-drawing-canvas.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
