# Whats the best way to draw paths for "unknown" amount of objects?

**URL:** <https://forum.inductiveautomation.com/t/whats-the-best-way-to-draw-paths-for-unknown-amount-of-objects/34365>\
**Category:** General Discussion\
**Created:** [May 2, 2020, 12:33am UTC](https://forum.inductiveautomation.com/t/whats-the-best-way-to-draw-paths-for-unknown-amount-of-objects/34365 "2020-05-02T00:33:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [May 2, 2020, 4:12am UTC](https://forum.inductiveautomation.com/t/whats-the-best-way-to-draw-paths-for-unknown-amount-of-objects/34365/3 "2020-05-02T04:12:22Z")

</div>

This would be quite easy to do with the paintable canvass as @pturmel notes. Here's my first experiment with it--not perfect, but gives a quick example of how to draw from coordinates like this, as well as scaling after drawing from coordinates to make everything fit into whatever space you give it.

> [@Animate Fill Level On Irregular Shaped Component](http://forum.inductiveautomation.com/t/animate-fill-level-on-irregular-shaped-component/15740/4):
>
> Thanks for pointing out the paintable canvas for this, @pturmel. Using it to draw a shape and then fill to a certain level is easy using the clip method. Definitely beats my previous method of creating shapes to fill the area and dynamically calculating their size and position to make it all work! Below is a basic example, in case it’s helpful to others. It expects the paintable canvas to have a custom property fillPercent used to set the fill level 0-100%: from java.awt import Color from java…

---

_[View the full topic](https://forum.inductiveautomation.com/t/whats-the-best-way-to-draw-paths-for-unknown-amount-of-objects/34365)._
