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?
No problem. Here is a script that draws a red square with a blue border:
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: