How to remove the clip of a region in html 5 canvas

前端 未结 1 813
走了就别回头了
走了就别回头了 2021-02-20 18:33

I am working with clip() in canvas.

I have made a region to clip(), as specified below

this.svgRenderer.ctx.rect(positionX, pos         


        
相关标签:
1条回答
  • 2021-02-20 19:12

    .clip is a permanent context state change.

    It can only be removed by wrapping it in .save and .restore.

    Changing the canvas element width will clear the context state (and remove clipping) but will also erase the existing drawings.

    0 讨论(0)
提交回复
热议问题