polygonToMobject method

VMobject polygonToMobject(
  1. Element polygonElement,
  2. SVGElementStyle style
)

Implementation

VMobject polygonToMobject(Element polygonElement, SVGElementStyle style) {
  var pathString = polygonElement.attributes['points']!;
  for (var digit in digits) {
    pathString = pathString.replaceAll(' $digit', ' L$digit');
  }

  style = style.update(getElementStyle(polygonElement));

  var mob = pathStringToMobject('M$pathString', style);
  return applyStyle(style.update(getElementStyle(polygonElement)), mob);
}