-- Horizontal Lines Auto Painter

--@TBCONFIG SLIDER: Offset, 0
--@TBCONFIG SLIDER: Spacing, 10
--@TBCONFIG SLIDER: Thickness, 3
--@TBCONFIG FLAG: Use Current Brush, false

local offset = height * sliderVal1
local spacing = height * sliderVal2
local thickness = sliderVal3 * 100
local currentBrushFlag = flagVal1

if spacing < 5 then
  spacing = 5	-- Keep things within a reasonable range
end
if thickness < 1 then
  thickness = 1
end

local y = (0 - (height - offset))

-- Preserve the brush color for restoring later
local brushR, brushG, brushB
brushR, brushG, brushB = get_color()

paint_open(0)

if currentBrushFlag == false then
  paint_select_brush("Art Pro - Natural Media", "Pro Pen Gel", 0)
  paint_brush_color(0, 0, 0)
end

paint_brush_size(thickness)

while y <= (height + (thickness)) do
  paint_line(0, y, width, y)
  y = y + spacing
end

-- Restore the original brush color
paint_brush_color(brushR, brushG, brushB)

paint_close()





