Re:Show HN: RoughJS – Create hand-drawn graphics using JavaS...
by hanoz on Tuesday March 13, 2018 @06:28AM
(#16574977)
What do all the context transformation lines do in this example? It seems to work just as well with clearRect on its own.
[ Parent
| on HN ]
Re:Show HN: RoughJS – Create hand-drawn graphics using JavaS...
by ygra on Tuesday March 13, 2018 @06:44AM
(#16575043)
There's only one such line. In general it's a good idea to reset the transform before clearing as the (0, 0, w, h) rectangle may not cover the whole canvas anymore. In this toy example there obviously isn't another transform so it's without function.