# Paintable Canvas Hacks

**URL:** <https://forum.inductiveautomation.com/t/paintable-canvas-hacks/85437>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 8, 2024, 3:25pm UTC](https://forum.inductiveautomation.com/t/paintable-canvas-hacks/85437 "2024-02-08T15:25:06Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [April 8, 2024, 6:12pm UTC](https://forum.inductiveautomation.com/t/paintable-canvas-hacks/85437/7 "2024-04-08T18:12:55Z")

</div>

> [@lrose](#):
>
> transform and/or scale to the final size at the end.

These lines from the default component example are handy:

```auto
#### Scale graphics to actual component size
dX = (event.width-1)/100.0
dY = (event.height-1)/100.0
g.scale(dX,dY)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/paintable-canvas-hacks/85437)._
