Skip to content
pixi-silk
GitHub repository
Interface

FillStyle

import type { FillStyle } from 'pixi-silk';

How a fill is painted: colour or gradient, opacity, blur with spread, blend mode and inner shadows.

Extended by#

Properties#

PropertyTypeDescriptionDefined in
alpha?numberOpacity from 0 to 1. Default 1.SilkGraphics.ts:84
blend?"normal" | "add"add paints plus-lighter: colours add to what is underneath, so overlapping glows bloom towards white. Default normal.SilkGraphics.ts:98
blur?number | ProgressiveBlurGaussian blur (standard deviation, local units) for glows and soft shadows. A ProgressiveBlur changes the radius across the shape.SilkGraphics.ts:91
color?ColorSourceColour, any Pixi ColorSource. With a gradient, it tints the gradient.SilkGraphics.ts:82
gradient?GradientGradient paint. color (if given) tints it.SilkGraphics.ts:86
innerShadow?InnerShadow | InnerShadow[]One or more shadows inside closed shapes, drawn in order on top of the fill.SilkGraphics.ts:100
op?ShapeOpCombines the closed shapes of the active path into one shape. subtract takes every later shape out of the first one, intersect keeps what they all cover, and exclude keeps what an odd number of them cover. union is the same as union: true. A path from moveTo() or svgPath() takes part as one shape, even-odd. With stroke(), the stroke follows the outline of the result. See SilkGraphics.boolean for nested operations. Default none: every shape is painted on its own.SilkGraphics.ts:117
spread?numberGrows the shape by this many local units before it is blurred, like a Figma shadow spread. Negative shrinks it.SilkGraphics.ts:93
union?booleanPaints every closed shape of the active path as one shape: their distance fields merge, so overlaps are painted once and blur, anti-aliasing and opacity show no seam where they meet. Polygons from poly() and moveTo() join in too, each subpath on its own. With stroke(), the stroke follows the outline of the union, and open paths merge into one stroke. Default false.SilkGraphics.ts:108