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

  • <tfoot id='s0Ook'></tfoot>

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

        <bdo id='s0Ook'></bdo><ul id='s0Ook'></ul>
      1. Fabrics - 如何在鼠标悬停之前呈现免费的绘图内容

        Fabrics - How to render free drawing content before mouse up(Fabrics - 如何在鼠标悬停之前呈现免费的绘图内容)

        <tfoot id='q1nxU'></tfoot>

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

                • <bdo id='q1nxU'></bdo><ul id='q1nxU'></ul>

                  本文介绍了Fabrics - 如何在鼠标悬停之前呈现免费的绘图内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个组件在after:render"事件中使用 fabricjs 画布内容,这适用于添加对象、移动对象等所有功能.

                  I have a component that is consuming fabricjs canvas content on the event "after:render", this works well with all the functions like adding objects, moving them etc.

                  然而,当涉及到自由绘图时,after:render"事件仅在绘图完成后触发,即鼠标向上事件.我试图在鼠标绘图时读取画布数据但没有运气,显然在绘图期间内容尚未呈现到画布上.

                  However when it come to free drawing, the "after:render" event only fire once the drawing is completed, ie on mouse up event. I tried to read the canvas data while the mouse is drawing but with no luck, apparently the contents is not yet rendered onto the canvas during drawing.

                  我从这个 PR https://github.com/fabricjs/fabric 了解到.js/pull/2895 ,免费绘图绘制在这个 contextTop 元素上,我的问题是我可以从中读取数据吗?或者无论如何强制织物在鼠标悬停之前呈现免费的绘图内容?我尝试了 renderAll() 运气不佳.

                  I understand that from this PR https://github.com/fabricjs/fabric.js/pull/2895 that the free drawing draws on this contextTop element, my question is can I read the data from it? Or is there anyway to force fabric to render free drawing contents before mouse up? I have tried renderAll() with little luck.

                  谢谢!

                  推荐答案

                  我认为你可以做到以下几点:

                  I think you can do the following:

                  var points = canvas.freeDrawingBrush._points;
                  var pathData = canvas.freeDrawingBrush.prototype.convertPointsToSVGPath.call(canvas.freeDrawingBrush, points);
                  

                  这应该为您提供实际的路径数据字符串,以便在您喜欢的系统中创建路径.

                  This should give you the actual path data string to create a path in the system you prefer.

                  这篇关于Fabrics - 如何在鼠标悬停之前呈现免费的绘图内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How does object-fit work with canvas element?(对象适合如何与画布元素一起使用?)
                  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(我想沿特定路径对对象进行动画处理)

                  <small id='4w2QB'></small><noframes id='4w2QB'>

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