LogoPixi’VN
pixi-jsFunctions

Function: buildSVGPath()

> buildSVGPath(path, precision?, flatten?): string

Defined in: node_modules/pixi.js/lib/scene/graphics/shared/svg/buildSVGPath.d.ts:13

Internal

Converts a GraphicsPath into an SVG path d attribute string. Mirrors parseSVGPath but in the reverse direction.

Parameters

path

GraphicsPath

The GraphicsPath to convert.

precision?

number

Number of decimal places for coordinates.

flatten?

boolean

When true, forces curve/arc geometry to be emitted as polylines. Used when the parser's naive area estimator must parse every number as a coordinate (e.g. hole subpaths).

Returns

string

The SVG d attribute value.