# Draw() overlay shapes on the canvas

**URL:** <https://discourse.processing.org/t/draw-overlay-shapes-on-the-canvas/31222>\
**Category:** Coding Questions\
**Created:** [July 13, 2021, 6:56am UTC](https://discourse.processing.org/t/draw-overlay-shapes-on-the-canvas/31222 "2021-07-13T06:56:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![k5221](https://avatars.discourse-cdn.com/v4/letter/k/bbe5ce/32.png) [@k5221](https://discourse.processing.org/u/k5221)\
**Post date:** [July 13, 2021, 6:56am UTC](https://discourse.processing.org/t/draw-overlay-shapes-on-the-canvas/31222/1 "2021-07-13T06:56:30Z")

</div>

Hi, I’m writing a code to call another custom render function I created inside the draw() to render shapes (which is essentially a bunch of ellipses) on the screen. But, it draws shapes on top of each other and doesn’t reset the canvas for each iteration of draw(). If I put clear() at the end of draw(), it essentially keeps showing nothing on the canvas… What do you think the problem is?

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)\
**Post date:** [July 13, 2021, 7:08am UTC](https://discourse.processing.org/t/draw-overlay-shapes-on-the-canvas/31222/2 "2021-07-13T07:08:12Z")

</div>

The first thing inside draw() should be a call to background().

The sketch does not automatically clear what was drawn previously.
