stroke-pattern-fill
✓ Published0🌍 Public
11wheel
Last edited Sep 3, 2017
Created on Jul 6, 2017
Two overlapping random paths are filled and stroked with striped patterns, using SVG `mask` elements to combine both effects without the banding artifact that occurs when a pattern is applied directly to a stroke. The blue and red diagonal stripes are defined as `pattern` fills, while white `path` masks with thick strokes reveal the underlying rectangles. The animation re-renders the shapes each frame, with the example built on D3 v4 and utility libraries like lodash for data manipulation.
AI-generated descriptionA mask lets you use the same pattern for stroke and fill without a banding effect.
Used in The Word Choices That Explain Why Jane Austen Endures.