SVG/Canvas doesn't display pattern when provided as an argument for stroke. Instead, default black color fill is applied.
Sample HTML content:
<svg>
<pattern id="pattern" width="10%" height="10%">
<rect x="0" y="0" width="5" height="5" fill="green" />
</pattern>
<rect x="10" y="10" width="100" height="100" fill="none"
stroke-width="20" stroke="url(#pattern)" />
</svg>
Sample HTML content:
<svg>
<pattern id="pattern" width="10%" height="10%">
<rect x="0" y="0" width="5" height="5" fill="green" />
</pattern>
<rect x="10" y="10" width="100" height="100" fill="none"
stroke-width="20" stroke="url(#pattern)" />
</svg>