<legend id='z12Yp'><style id='z12Yp'><dir id='z12Yp'><q id='z12Yp'></q></dir></style></legend>
      <tfoot id='z12Yp'></tfoot>
      1. <small id='z12Yp'></small><noframes id='z12Yp'>

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

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

        canvas.toDataURLWithMultiplier 不是函数

        时间:2023-08-02
        <tfoot id='FcRih'></tfoot>

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

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

                  <tbody id='FcRih'></tbody>

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

                  本文介绍了canvas.toDataURLWithMultiplier 不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试导出 4 倍于画布大小的图像.

                  I am trying to export an image 4x the size of the canvas one.

                  var dataURL = canvas.toDataURL();
                  

                  我将图像设置为画布的大小

                  I get the image set to the size of the canvas

                  但是当我尝试时

                  var dataURL = canvas.toDataURLWithMultiplier(4);
                  

                  我收到错误canvas.toDataURLWithMultiplier 不是函数"

                  I get the error "canvas.toDataURLWithMultiplier is not a function"

                  下面是我的函数.

                  $('.preview').on('click touchstart', function() {
                  
                    // save canvas image as data url (png format by default)
                    canvas.isGrabMode = false;
                    canvas.setZoom(1.0);
                    canvas.viewportTransform = [1, 0, 0, 1, 0, 0];
                    // var dataURL = canvas.toDataURL();
                  
                    var dataURL = canvas.toDataURLWithMultiplier(4);
                    // so it can be saved as an image
                    document.getElementById('previewImg').src = dataURL;
                  
                    canvas.renderAll();
                  
                  });
                  

                  推荐答案

                  var dataURL = canvas.toDataURL({
                    format: 'png',
                    multiplier: 4
                  });
                  

                  在 toDataURL()multiplier 属性>.

                  Use multiplier property in toDataURL().

                  这篇关于canvas.toDataURLWithMultiplier 不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 jqgrid 中实现删除和编辑操作 下一篇:使用浮点数时,fillRect() 不完全重叠

                  相关文章

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

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