Skip to main content
A partial set of paint properties used to initialize or update a Paint instance. All fields are optional.

Fields

style

The painting style (stroke or fill).
local paint = Paint.new()
paint.style = 'fill'

join

Stroke join behavior for corners.
local paint = Paint.new()
paint.join = 'round'

cap

Stroke cap used for line endings.
local paint = Paint.new()
paint.cap = 'round'

thickness

Thickness of the stroked path.
local paint = Paint.new()
paint.thickness = 4,

blendMode

Blending mode used when compositing.
local paint = Paint.new()
paint.blendMode = 'multiply',

feather

Feathering amount.
local paint = Paint.new()
paint.feather = 3,

gradient

Gradient fill applied to the paint. If explicitly set to false, removes any existing gradient.
local g = Gradient.linear(Vector.xy(0, 0), Vector.xy(10, 0), {
  { position = 0, color = Color.rgb(255, 0, 0) },
  { position = 1, color = Color.rgb(0, 0, 255) },
})

local paint = Paint.new()
paint.gradient = g

color

Color. See Color.