fillContributesToPaint function
Whether a foreground has any visible color. Geometry and node visibility are evaluated separately; source underlays do not depend on this result.
Implementation
bool fillContributesToPaint(CanvasFill fill) => switch (fill) {
CanvasFillNone() => false,
CanvasFillSolid(:final color) => _colorContributesToPaint(color),
CanvasFillGradient(:final grad) => grad.stops.any(
(stop) => _colorContributesToPaint(stop.color),
),
};