# How to increase line width?

**URL:** <https://forum.inductiveautomation.com/t/how-to-increase-line-width/70807>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [March 9, 2023, 3:08am UTC](https://forum.inductiveautomation.com/t/how-to-increase-line-width/70807 "2023-03-09T03:08:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veeramani\_D](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@Veeramani\_D](https://forum.inductiveautomation.com/u/Veeramani_D)\
**Post date:** [March 9, 2023, 3:08am UTC](https://forum.inductiveautomation.com/t/how-to-increase-line-width/70807/1 "2023-03-09T03:08:50Z")

</div>

I'm working on paintable canvas. I am trying to increase the line width of my rectangle. If any one has script to increase line width, can you share it with me?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/764dab399282e546d2015d840cef079ba168e26e.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3abced82a59cad18e5345486615c0748c37054bd.png)

---

<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:** [March 9, 2023, 6:20am UTC](https://forum.inductiveautomation.com/t/how-to-increase-line-width/70807/2 "2023-03-09T06:20:59Z")

</div>

[No problem](https://forum.inductiveautomation.com/t/add-script-to-dynamically-created-objects/64215/15). Here is a script that draws a red square with a blue border:

```auto
from java.awt import Color, BasicStroke #Add BasicStroke Here
from java.awt.geom import Rectangle2D
x = 20
y = 20
width = 100
height = 100
rectangle = Rectangle2D.Float( x, y, width, height)
g = event.graphics

#Border Script
g.setColor(Color.BLUE)
stroke = BasicStroke(10) #Set Width of border here
g.setStroke(stroke)
g.draw(rectangle) #Draw Border Here

g.setColor(Color.RED)
g.fill(rectangle)

```

Here is the result:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c0544f3079a7fece0b351def61187fe55df4510f.png)
