LogoPixi’VN
pixi-jsType aliases

Type Alias: StrokeInput

> StrokeInput = ColorSource | FillGradient | FillPattern | StrokeStyle

Defined in: node_modules/pixi.js/lib/scene/graphics/shared/FillTypes.d.ts:440

These can be directly used as a stroke

graphics.stroke(0xff0000);
graphics.stroke(new FillPattern(texture));
graphics.stroke(new FillGradient(0, 0, 200, 0));
graphics.stroke({
  color: 0xff0000,
  width?: 1,
  alignment?: 0.5,
});
graphics.stroke({
  fill: new FillPattern(texture),
  width: 1,
  alignment: 0.5,
});
graphics.stroke({
  fill: new FillGradient(0, 0, 200, 0),
  width: 1,
  alignment: 0.5,
});

Standard