applyVMobjectFill method

void applyVMobjectFill(
  1. Path2D path,
  2. VMobject vmob
)

Implementation

void applyVMobjectFill(Path2D path, VMobject vmob) {
  var fillColors = vmob.getFillColors();

  if (fillColors.length > 1) {
    ctx.fillStyle = createVMobjectGradient(vmob, fillColors);
  } else {
    var color = display.applyColorTransformation(vmob.getFillColor());
    ctx.fillStyle = color.toRGBAString();
  }

  ctx.fill(path);
}