title: HTML Canvas transparent stroke line
body: <p>I want to clear a stroked rectangle in certain canvas area. My initial thought was that I just need to call <code>context.strokeRect</code> function again with same parameters, with changing <code>strokeStyle</code> to <code>transparent</code> before. However it isn't working. Why and how can I fix it? Note that I want to only clear stroke (border) of rectangle, not everything inside.</p>
  
  <p>Edit: I want to clear only border, not everything inside, so I can't use <code>clearRect()</code> method. Also I can't clear whole canvas and repaint it, because canvas contains animations.</p>
  
  <p>JS fiddle: <a href="https://jsfiddle.net/47okok8s/" rel="nofollow noreferrer">https://jsfiddle.net/47okok8s/</a></p>