Interface
StrokeStyle
How a stroke is painted: width (or tapered widths), alignment, caps, dashes, plus everything in FillStyle.
Extends#
Properties#
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
alignment? | number | "center" | "inside" | "outside" | inside | center | outside, or Pixi’s numeric alignment (1 inside, 0.5 center, 0 outside). |
alpha? | number | Opacity from 0 to 1. Default 1. | FillStyle.alpha | SilkGraphics.ts:31 |
blur? | number | Gaussian blur radius (standard deviation, local units). Great for glows and soft shadows. | FillStyle.blur | SilkGraphics.ts:35 |
cap? | LineCap | Ends of open paths and of dashes. Default butt (Pixi default). | - | SilkGraphics.ts:54 |
color? | ColorSource | Colour, any Pixi ColorSource. With a gradient, it tints the gradient. | FillStyle.color | SilkGraphics.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? | boolean | On closed outlines stretch the pattern so it tiles without a seam. Default true. | - | SilkGraphics.ts:60 |
dashOffset? | number | Shifts the dash pattern along the path, in local units. Default 0. | - | SilkGraphics.ts:58 |
gradient? | Gradient | Gradient paint. color (if given) tints it. | FillStyle.gradient | SilkGraphics.ts:33 |
join? | "round" | "miter" | "bevel" | Accepted for Pixi compatibility. Joins are always round, the smoothest choice. | - | SilkGraphics.ts:62 |
miterLimit? | number | Accepted 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 |