TwistedBrush Lua Filter Paint APIs

paint_open(seed) -- Seed is a random seed

paint_close() -- End the paint session

paint_stroke_start(x, y) - Start a new stroke.

paint_stroke_stop() -- End the stroke

paint_stroke_pos(x, y, pressure) -- New stroke position

paint_select_brush(artsetName, brushName, mergeEffects)

paint_brush_size(size)

paint_brush_density(density)

paint_brush_opacity(opacity)

paint_brush_color(r, g, B)

paint_set_color_banks(selectedBank, r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4)

paint_line(x1, y1, x2, y2)

paint_spline(x1, y1, x2, y2, cx1, cy1, cx2, cy2)

paint_dab(x, y, pressure)

-- The parameters for the paint_filter() function directly correspond to the controls for the filter in question.
paint_filter(filtername, variant, slider1, slider2, slider3, slider4, slider5, slider6, style1, style2, flag1, flag2, flag3, flag4, 

flag5, flag6, r, g, b, ustring)

-- These paint functions were available starting in 17.28
paint_buffer_from_layer(bufNum)  -- Copy contents of the current layer into the bufNum

paint_buffer_to_layer(bufNum)    -- Copy contents of the bufNum into the current layer

paint_buffer_copy(srcBufNum, dstBufNum)   -- Copy contents of SrcBufNum to DstBufNum

paint_buffer_clear(bufNum)        -- Clear content of the bufNum

paint_buffer_merge_layer(bufNum, mixMode, opacity)  -- Merge conents of the bufNum into the current layer, using the 
mix mode (merge type) and opacity

paint_buffer_from_mask(bufNum)    -- Copy contents of the current mask into the bufNum

paint_buffer_to_mask(bufNum)     -- Copy contents fo the bufNum into the current mask

paint_flip_horizontal()          -- Flip horizontal

paint_flip_vertical()            -- Flip vertical

paint_clear_page()               -- Clear the current layer

paint_fill_page()                -- Fill the current layer with the current color.    

paint_set_page(r, g, b, a)       -- Set current layer to the r, g, b, a values

paint_mask_on(flag)              -- Turn mask on or off (values 1 or 0)

paint_mask_clear()               -- Clear the mask

paint_mask_invert()              -- Invert the mask

paint_create_from_mask()         -- Set current layer values from current mask

paint_alpha_create_from_mask()      -- Set alpha values of current layer from the current mask

paint_mask_create_from_image()      -- Create mask from current layer data

paint_mask_create_from_image_luma() -- Create mask from current layer data using luma values 

paint_mask_create_from_alpha()      -- Create mask from current layer alpha data

paint_flood_fill(r, g, b, x, y, tolerance, fillType)   -- Flood fill tool                 

paint_rectangle(r, g, b, x1, y1, x2, y2, opacity)               -- Rectangle tool       

paint_ellipse(r, g, b, x1, y1, x2, y2, opacity)                 -- Ellipse tool

paint_text(r, g, b, x, y, fontName, fontHeight, fontBold, fontItalic, string)           -- Text tool. Note: The paint_text function is currently non-operational unless a font if first selected wia the Text tool.

paint_gradient(r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4, colorCount, x1, y1, x2, y2, gradType)  -- Gradient tool

paint_mask_ellipse(x1, y1, x2, y2, maskLevel)        -- Old Mask Ellipse tool

paint_mask_rectangle(x1, y1, x2, y2, maskLevel)      -- Old Mask Rectangle tool

paint_mask_wand(x, y, tolerance, opacity, maskWandType)         -- Mask Wand tool

paint_copy(x1, y1, x2, y2)                                      -- Old Copy tool                        

paint_paste(x, y, size, rotateAngle, highQualityFlag)           -- Old Paste tool   

paint_warp(x1, y1, x2, y2, warpMode, warpStrength)              -- Warp tool

paint_rotate_brush(x1, y1, x2, y2)