strokeContributesToPaint function
Whether the configured stroke can paint pixels. Invalid colors and widths are skipped defensively; validation still reports them on invisible strokes.
Implementation
bool strokeContributesToPaint(CanvasStroke? stroke) =>
stroke != null &&
_colorContributesToPaint(stroke.color) &&
stroke.width.isFinite &&
stroke.width > 0;