<tfoot id='0hTqf'></tfoot>

    <i id='0hTqf'><tr id='0hTqf'><dt id='0hTqf'><q id='0hTqf'><span id='0hTqf'><b id='0hTqf'><form id='0hTqf'><ins id='0hTqf'></ins><ul id='0hTqf'></ul><sub id='0hTqf'></sub></form><legend id='0hTqf'></legend><bdo id='0hTqf'><pre id='0hTqf'><center id='0hTqf'></center></pre></bdo></b><th id='0hTqf'></th></span></q></dt></tr></i><div id='0hTqf'><tfoot id='0hTqf'></tfoot><dl id='0hTqf'><fieldset id='0hTqf'></fieldset></dl></div>

    <small id='0hTqf'></small><noframes id='0hTqf'>

    1. <legend id='0hTqf'><style id='0hTqf'><dir id='0hTqf'><q id='0hTqf'></q></dir></style></legend>

        <bdo id='0hTqf'></bdo><ul id='0hTqf'></ul>
      1. 如何清除画布以进行重绘

        How to clear the canvas for redrawing(如何清除画布以进行重绘)
        • <bdo id='c5LOv'></bdo><ul id='c5LOv'></ul>

          1. <legend id='c5LOv'><style id='c5LOv'><dir id='c5LOv'><q id='c5LOv'></q></dir></style></legend>
                <tbody id='c5LOv'></tbody>
              1. <i id='c5LOv'><tr id='c5LOv'><dt id='c5LOv'><q id='c5LOv'><span id='c5LOv'><b id='c5LOv'><form id='c5LOv'><ins id='c5LOv'></ins><ul id='c5LOv'></ul><sub id='c5LOv'></sub></form><legend id='c5LOv'></legend><bdo id='c5LOv'><pre id='c5LOv'><center id='c5LOv'></center></pre></bdo></b><th id='c5LOv'></th></span></q></dt></tr></i><div id='c5LOv'><tfoot id='c5LOv'></tfoot><dl id='c5LOv'><fieldset id='c5LOv'></fieldset></dl></div>
              2. <small id='c5LOv'></small><noframes id='c5LOv'>

                <tfoot id='c5LOv'></tfoot>

                  本文介绍了如何清除画布以进行重绘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在尝试了合成操作并在画布上绘制图像之后,我现在尝试删除图像并进行合成.我该怎么做?

                  After experimenting with composite operations and drawing images on the canvas I'm now trying to remove images and compositing. How do I do this?

                  我需要清除画布以重绘其他图像;这可能会持续一段时间,所以我不认为每次都绘制一个新矩形是最有效的选择.

                  I need to clear the canvas for redrawing other images; this can go on for a while so I don't think drawing a new rectangle every time will be the most efficient option.

                  推荐答案

                  鉴于 canvas 是一个画布元素或 OffscreenCanvas 对象,

                  Given that canvas is a canvas element or an OffscreenCanvas object,

                  const context = canvas.getContext('2d');
                  
                  context.clearRect(0, 0, canvas.width, canvas.height);
                  

                  这篇关于如何清除画布以进行重绘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to make rooftext effect and valley text effect in HTML5 (or Fabric.js)(如何在 HTML5(或 Fabric.js)中制作屋顶文字效果和山谷文字效果)
                  Draw border around nontransparent part of image on canvas(在画布上的图像不透明部分周围绘制边框)
                  dragging and resizing an image on html5 canvas(在 html5 画布上拖动图像并调整其大小)
                  What#39;s the difference between a boolean as primitive and a boolean as property of an object?(作为原始对象的布尔值和作为对象属性的布尔值有什么区别?)
                  I want to do animation of an object along a particular path(我想沿特定路径对对象进行动画处理)
                  How to upload image into HTML5 canvas(如何将图像上传到 HTML5 画布中)
                  <tfoot id='zco7e'></tfoot>

                  <small id='zco7e'></small><noframes id='zco7e'>

                • <i id='zco7e'><tr id='zco7e'><dt id='zco7e'><q id='zco7e'><span id='zco7e'><b id='zco7e'><form id='zco7e'><ins id='zco7e'></ins><ul id='zco7e'></ul><sub id='zco7e'></sub></form><legend id='zco7e'></legend><bdo id='zco7e'><pre id='zco7e'><center id='zco7e'></center></pre></bdo></b><th id='zco7e'></th></span></q></dt></tr></i><div id='zco7e'><tfoot id='zco7e'></tfoot><dl id='zco7e'><fieldset id='zco7e'></fieldset></dl></div>

                      <bdo id='zco7e'></bdo><ul id='zco7e'></ul>

                      <legend id='zco7e'><style id='zco7e'><dir id='zco7e'><q id='zco7e'></q></dir></style></legend>

                          <tbody id='zco7e'></tbody>