GSVG.fromSVG constructor
GSVG.fromSVG(})
Implementation
factory GSVG.fromSVG(int x, int y, int width, int height, String svg,
{PColor? strokeColor,
int? strokeSize,
PColor? fillColor,
num? scaleX,
num? scaleY}) {
var returnViewBox = <_SVGViewBox?>[null];
var elements = _parseSVG(svg,
strokeColor: strokeColor,
strokeSize: strokeSize,
fillColor: fillColor,
returnViewBox: returnViewBox);
var viewBox = returnViewBox[0];
viewBox = viewBox?.copyWith(svgWidth: width, svgHeight: height);
return GSVG(
x,
y,
width,
height,
strokeColor: strokeColor,
strokeSize: strokeSize,
fillColor: fillColor,
scaleX: scaleX ?? viewBox?.scaleX,
scaleY: scaleY ?? viewBox?.scaleY,
elements);
}