> ## Documentation Index
> Fetch the complete documentation index at: https://rive.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# PaintDefinition

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).

```lua theme={null}
local paint = Paint.new()
paint.style = 'fill'
```

### `join`

Stroke join behavior for corners.

```lua theme={null}
local paint = Paint.new()
paint.join = 'round'
```

### `cap`

Stroke cap used for line endings.

```lua theme={null}
local paint = Paint.new()
paint.cap = 'round'
```

### `thickness`

Thickness of the stroked path.

```lua theme={null}
local paint = Paint.new()
paint.thickness = 4,
```

### `blendMode`

Blending mode used when compositing.

```lua theme={null}
local paint = Paint.new()
paint.blendMode = 'multiply',
```

### `feather`

Feathering amount.

```lua theme={null}
local paint = Paint.new()
paint.feather = 3,
```

### `gradient`

[Gradient](/scripting/api-reference/gradient/gradient) fill applied to the paint.
If explicitly set to `false`, removes any existing gradient.

```lua highlight={7} theme={null}
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](/scripting/api-reference/color/color).
