<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 不是函数

        canvas.toDataURLWithMultiplier is not a function(canvas.toDataURLWithMultiplier 不是函数)
        <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 不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  quot;Status Code:200 OK (from ServiceWorker)quot; in Chrome Network DevTools?(“状态码:200 OK(来自 ServiceWorker)在 Chrome 网络开发工具中?)
                  How to set a header for a HTTP GET request, and trigger file download?(如何为 HTTP GET 请求设置标头并触发文件下载?)
                  Adding custom HTTP headers using JavaScript(使用 JavaScript 添加自定义 HTTP 标头)
                  SQL Query DocumentDB in Azure Functions by an integer not working(通过整数在 Azure Functions 中 SQL 查询 DocumentDB 不起作用)
                  Azure Functions [JavaScript / Node.js] - HTTP call, good practices(Azure Functions [JavaScript/Node.js] - HTTP 调用,良好实践)
                  Azure Functions - Import Custom Node Module(Azure Functions - 导入自定义节点模块)

                    <tbody id='Y1mBL'></tbody>
                  <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>
                          • <small id='Y1mBL'></small><noframes id='Y1mBL'>