Aaron McGuire Posted September 17, 2019 Share Posted September 17, 2019 Is it possible to use a "stroke" as a mask? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 17, 2019 Share Posted September 17, 2019 Only in Webgl mode. No fallback in canvas. Quote Link to comment Share on other sites More sharing options...
grelf Posted September 17, 2019 Share Posted September 17, 2019 You can indeed use a stroke path for clipping in the ordinary 2D context. See https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clip And I say more about it on my Forest design page: see https://grelf.net/forestdesign.html#N657302 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 17, 2019 Share Posted September 17, 2019 ctx.beginPath(); ctx.arc(100, 75, 50, 0, Math.PI * 2); ctx.clip(); @grelf its fill. Unless author of the topic also thinks that stroke and fill is the same thing ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.