renderVMobject method

  1. @override
void renderVMobject(
  1. VMobject vmob
)
override

Implementation

@override
void renderVMobject(VMobject vmob) {
  var points = transformPointsPreDisplay(vmob, vmob.getPoints());

  if (points.isEmpty) {
    return;
  }

  var subpaths = vmob.getSubpathsFromPoints2D(points);
  var totalPath = '';

  for (var subpath in subpaths) {
    totalPath += getVMobjectSubpath(vmob, subpath);
  }

  var path = Path2D(totalPath);

  applyVMobjectStroke(path, vmob, background: true);
  applyVMobjectFill(path, vmob);
  applyVMobjectStroke(path, vmob, background: false);
}