ellipseToMobject method

VMobject ellipseToMobject(
  1. Element ellipseElement,
  2. SVGElementStyle style
)

Implementation

VMobject ellipseToMobject(Element ellipseElement, SVGElementStyle style) {
  var x = attributeToDouble(ellipseElement.attributes['cx']);
  var y = attributeToDouble(ellipseElement.attributes['cy']);
  var rx = attributeToDouble(ellipseElement.attributes['rx']);
  var ry = attributeToDouble(ellipseElement.attributes['ry']);

  var mob = Ellipse(width: rx * 2, height: ry * 2)
    ..shift(RIGHT * x + DOWN * y);
  return applyStyle(style.update(getElementStyle(ellipseElement)), mob);
}