call method

Path call(
  1. Size size,
  2. double value
)

Implementation

Path call(Size size, double value) {
  // Extremities
  if (value == 1) {
    return _getBoundary(size); // ...everything
  }
  if (value == 0) {
    return Path(); // ...nothing
  }
  // All the values between
  if (!invert) {
    return buildPath(size, value);
  } else {
    // Subtract the path from the boundary
    return Path.combine(
      PathOperation.reverseDifference,
      buildPath(size, 1 - value),
      _getBoundary(size),
    );
  }
}