drawPiecefunction
One piece on its own, as SVG text: for a legend, an icon, or a page that shows how the pieces look. wet fills it with water.
Import it
import { drawPiece } from "@johnmorrisdotca/suido/draw";
Definition
function drawPiece(mask: number, options?: { wet?: boolean; label?: string; style?: boolean; }): string
Parameters
| Name | Type | Description |
|---|---|---|
mask | number | A pipe mask: north 1, east 2, south 4 and west 8. |
options (optional) | { wet?: boolean; label?: string; style?: boolean; } | Drawing, mounting or generator choices specified by the signature. |
Returns
string
One piece on its own, as SVG text: for a legend, an icon, or a page that shows how the pieces look. wet fills it with water.
Examples
import { drawPiece } from "@johnmorrisdotca/suido/draw";
console.log(drawPiece(3,{label:"Elbow"}).startsWith("<svg"));trueWhat it prints (run when this page was built)