<tfoot id='b6H4K'></tfoot>

  • <small id='b6H4K'></small><noframes id='b6H4K'>

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

      <legend id='b6H4K'><style id='b6H4K'><dir id='b6H4K'><q id='b6H4K'></q></dir></style></legend>
      1. 如何从 html 画布中取消绘制、隐藏、删除或删除图像?

        时间:2023-06-20

            <tbody id='D4tPd'></tbody>

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

            <legend id='D4tPd'><style id='D4tPd'><dir id='D4tPd'><q id='D4tPd'></q></dir></style></legend>
              <tfoot id='D4tPd'></tfoot>
                  <bdo id='D4tPd'></bdo><ul id='D4tPd'></ul>
                  <i id='D4tPd'><tr id='D4tPd'><dt id='D4tPd'><q id='D4tPd'><span id='D4tPd'><b id='D4tPd'><form id='D4tPd'><ins id='D4tPd'></ins><ul id='D4tPd'></ul><sub id='D4tPd'></sub></form><legend id='D4tPd'></legend><bdo id='D4tPd'><pre id='D4tPd'><center id='D4tPd'></center></pre></bdo></b><th id='D4tPd'></th></span></q></dt></tr></i><div id='D4tPd'><tfoot id='D4tPd'></tfoot><dl id='D4tPd'><fieldset id='D4tPd'></fieldset></dl></div>
                  本文介绍了如何从 html 画布中取消绘制、隐藏、删除或删除图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  this.context.drawImage(myimage, 0, 0);
                  

                  将图像放在画布上已经很好地覆盖了整个网络.但是出现后如何删除呢?

                  Putting the image on the canvas is pretty well covered all over the web. But how do I remove it after it's there?

                  推荐答案

                  选项1:
                  在其上绘制一个与背景颜色相同的矩形.

                  Option 1:
                  Draw a rectangle over it of the same color as the background.

                  选项 2(适用于非平凡背景,但速度较慢):
                  在绘图前从画布中获取像素数据图像,然后重绘该像素数据以移除图像.

                  Option 2 (works for non-trivial background, but slower):
                  Get the pixel data from the canvas before drawing the image, then redraw that pixel data to remove the image.

                  这篇关于如何从 html 画布中取消绘制、隐藏、删除或删除图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Fabric.js - 绘制多个图像 zindex 的问题 下一篇:canvas.toDataURL() 和 drawImage() 的安全错误

                  相关文章

                  <tfoot id='lywSZ'></tfoot>
                    • <bdo id='lywSZ'></bdo><ul id='lywSZ'></ul>

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

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