Radial

Description

Name

class Tinman.Brush.Radial

Derived from

Brush

A fixed mask brush that creates a radial coverage mask.

The center sample has full coverage, the border samples have zero coverage. The coverage of the samples in-between is computed like this:

half     = size / 2
value    = max(0, half - length(x - half, y - half)) / half
coverage = pow(value, power)

If power is 0, the following formula is used:

coverage = smoothstep(value)

where smoothstep(x) is defined as x * x * x * (x * (x * 6 - 15) + 10).

Fields / Required

size

Type

number

Constraint

# > 0

The brush size (both width and height).

Fields / Optional

power

Type

number

Constraint

# >= 0

Default

1

The power to raise the coverage value (see remarks).


inner

Type

number

Constraint

# >= 0 && # <= 1

Default

0

Normalized radius of inner circle that has full coverage.


shape

Type

number

Constraint

# > 0

Default

2

The power to use for computing the distance to the center sample:
< 1: star shape
< 2: egg shape
= 2: circle shape (Euclidean distance)
> 2: balloon shape