Skip to main content

Function: writeRange()

writeRange(config, param, range): Partial<BrushConfig>

Defined in: src/lib/brushes/configRanges/index.ts:307

Write a setting's range (in the window's unit) as config changes; for a setting that doesn't vary, only value. Sizes and opacity take the high end as their value (what the tool settings bar shows) and the low end as a share of it.

Parameters​

config​

BrushConfig

param​

VaryingParam

range​

max?​

number

min?​

number

value?​

number

Returns​

Partial<BrushConfig>

Example​

writeRange({ width: 40, widthConfig: { usePressure: true } }, "width", { min: 10, max: 40 });
// { width: 40, widthConfig: { usePressure: true, min: 0.25, max: 1 } }