Skip to content

1681-engine / pixel / frameSvg

Function: frameSvg() ​

ts
function frameSvg(grid, scale?): string;

Defined in: src/pixel/nineSlice.ts:119

Any pixel grid as an SVG of scale-sized squares (shape-rendering="crispEdges"), runs of one colour on a row merged into one rect: what a CSS border-image takes, sliced at the insets × scale.

Parameters ​

ParameterTypeDefault value
gridPixelGridundefined
scalenumber2

Returns ​

string

Released under the MIT License.