# Structuring your Drawing Code | KIRUPA

**URL:** https://forum.kirupa.com/t/structuring-your-drawing-code-kirupa/636252
**Category:** programming
**Created:** [March 20, 2017, 7:25pm UTC](https://forum.kirupa.com/t/structuring-your-drawing-code-kirupa/636252 "2017-03-20T19:25:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [March 20, 2017, 7:25pm UTC](https://forum.kirupa.com/t/structuring-your-drawing-code-kirupa/636252/1 "2017-03-20T19:25:24Z")

</div>

by [kirupa](http://www.kirupa.com/www.kirupa.com/me/index.htm) | 24 December 2015

Up until this point, we've been drawing each shape individually. That was fine for learning how the various draw commands work. In real life, you'll rarely issue draw commands directly. You'll instead delegate the drawing to a helper function or custom object or something else that makes drawing things more maintainable.

* * *
This is a companion discussion topic for the original entry at [http://www.kirupa.com/canvas/structuring\_your\_drawing\_code.htm](http://www.kirupa.com/canvas/structuring_your_drawing_code.htm)
