When drawing an SVG shape (with style disabled) using the P2D renderer, the rendering will glitch if the shape is drawn more than once with a different stroke weight.
Expected Behavior
The shape should appear on the canvas at different stroke weights.
Current Behavior
The first instance of the shape appears as expected. Subsequent shapes (drawn after changing strokeWeight) are drawn with a glitched stroke.
Steps to Reproduce
Set up sketch with P2D renderer.
Load an SVG into a PShape and call disableStyle() on it.
Draw the shape to the screen once, then change strokeWeight and draw again.
Description
When drawing an SVG shape (with style disabled) using the P2D renderer, the rendering will glitch if the shape is drawn more than once with a different stroke weight.
Expected Behavior
The shape should appear on the canvas at different stroke weights.
Current Behavior
The first instance of the shape appears as expected. Subsequent shapes (drawn after changing
strokeWeight
) are drawn with a glitched stroke.Steps to Reproduce
disableStyle()
on it.strokeWeight
and draw again.Example code (from this repo with SVG file included):
Your Environment
Workarounds