-- lua script to make page frame from current brush stroke
--@TBCONFIG SLIDER: Margin Width, 5
--@TBCONFIG SLIDER: Brush Size, 5
--========================
local size = sliderVal2 * 100
if size == 0 then size = 1 end

local margin = (sliderVal1 * (math.min(width, height) / 2))

local x1 = margin
local x2 = width - margin
local y1 = margin
local y2 = height- margin

paint_open(1)
paint_brush_size(size)

paint_line(x1, y1, x2, y1)
paint_line(x2, y1, x2, y2)
paint_line(x2, y2, x1, y2)
paint_line(x1, y2, x1, y1)

paint_close() 
	
