shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$SVGExporter = function(global, require, module, exports) {
var GraphicsContext = require("module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$GraphicsContext"), buildSVGDefinitions = require("module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$buildSVGDefinitions"), buildSVGPath = require("module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$buildSVGPath"), buildSVGStyle = require("module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$buildSVGStyle");
"use strict";
exports.graphicsContextToSvg = function(source, precision = 2) {
var context = source instanceof GraphicsContext.GraphicsContext ? source : source.context, defs = new buildSVGDefinitions.SVGDefsCollector();
source = [];
for (var instructions = context.instructions, i = 0; i < instructions.length;) {
var inst = instructions[i];
switch(inst.action) {
case "fill":
var fillInst = inst, d = (inst = !!fillInst.data.hole) ? buildSVGPath.buildSVGPath(fillInst.data.path, precision) + buildSVGPath.buildSVGPath(fillInst.data.hole, precision, !0) : buildSVGPath.buildSVGPath(fillInst.data.path, precision);
fillInst = buildSVGStyle.buildSVGFillAttributes(fillInst.data.style, defs);
source.push(``);
break;
case "stroke":
d = inst, inst = buildSVGPath.buildSVGPath(d.data.path, precision), d.data.hole && (inst += buildSVGPath.buildSVGPath(d.data.hole, precision, !0)), d = buildSVGStyle.buildSVGStrokeAttributes(d.data.style, defs), source.push(``);
}
i++;
}
inst = context.bounds;
context = parseFloat(inst.minX.toFixed(precision));
instructions = parseFloat(inst.minY.toFixed(precision));
i = parseFloat((inst.maxX - inst.minX).toFixed(precision));
precision = parseFloat((inst.maxY - inst.minY).toFixed(precision));
defs = defs.build();
source = source.join("");
return ``;
};
};
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$SVGExporter.js.map