Skip to content
GitHub repository
Interface

StrokeStyle

How a stroke is painted: width (or tapered widths), alignment, caps, dashes, plus everything in FillStyle.

Extends#

Properties#

PropertyTypeDescriptionInherited fromDefined in
alignment?number | "center" | "inside" | "outside"insidecenteroutside, or Pixi’s numeric alignment (1 inside, 0.5 center, 0 outside).
alpha?numberOpacity from 0 to 1. Default 1.FillStyle.alphaSilkGraphics.ts:31
blur?numberGaussian blur radius (standard deviation, local units). Great for glows and soft shadows.FillStyle.blurSilkGraphics.ts:35
cap?LineCapEnds of open paths and of dashes. Default butt (Pixi default).-SilkGraphics.ts:54
color?ColorSourceColour, any Pixi ColorSource. With a gradient, it tints the gradient.FillStyle.colorSilkGraphics.ts:29
dash?number | [number, number][dash, gap] or a single number for equal dash and gap. A 0 dash with round caps gives dots.-SilkGraphics.ts:56
dashFit?booleanOn closed outlines stretch the pattern so it tiles without a seam. Default true.-SilkGraphics.ts:60
dashOffset?numberShifts the dash pattern along the path, in local units. Default 0.-SilkGraphics.ts:58
gradient?GradientGradient paint. color (if given) tints it.FillStyle.gradientSilkGraphics.ts:33
join?"round" | "miter" | "bevel"Accepted for Pixi compatibility. Joins are always round, the smoothest choice.-SilkGraphics.ts:62
miterLimit?numberAccepted for Pixi compatibility and ignored.-SilkGraphics.ts:64
width?number | number[]Default 1. On polylines an array tapers the stroke: [start, end] interpolates along the path length, one value per point sets each vertex.-SilkGraphics.ts:50