Creates a new Graphics object.
Optionaloptions: GraphicsContext | GraphicsOptions
Options for the Graphics.
Adds a dashed line from (x1, y1) to (x2, y2) as separate segments, to be stroked like any
other path: shape.dashedLine(0, 0, 100, 0, 6, 4).stroke({ color: 0xffffff, width: 1 }).
Pixi strokes are solid only, so the dashes are built here, the pattern starting at the
first point.
Vector drawing - rectangles, circles, polygons, lines - under an MWG-owned name.
Pixi's own
GraphicsAPI (.rect(...).fill(...),.circle(...).stroke(...),moveTo/lineTo) is already the right shape for this; wrapping it class-for-method would only duplicate an API this project does not own and would drift from every Pixi upgrade. The bare re-export is what lets a game draw shapes without importingpixi.jsitself.Example