<legend id='Rhibu'><style id='Rhibu'><dir id='Rhibu'><q id='Rhibu'></q></dir></style></legend>
    <tfoot id='Rhibu'></tfoot>

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

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

        用户在 HTML5 画布应用程序中绘制的平滑锯齿线?

        Smooth jagged lines drawn by user in HTML5 canvas app?(用户在 HTML5 画布应用程序中绘制的平滑锯齿线?)

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

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

          • <legend id='Lz1m9'><style id='Lz1m9'><dir id='Lz1m9'><q id='Lz1m9'></q></dir></style></legend>

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

                1. 本文介绍了用户在 HTML5 画布应用程序中绘制的平滑锯齿线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我们有一个 HTML5 绘图应用程序,用户可以在其中使用铅笔工具绘制线条.

                  We have an HTML5 drawing app where users can draw lines using a pencil tool.

                  与基于 Flash 的绘图应用程序相比,线条的边缘略微呈锯齿状,看起来有些模糊.发生这种情况是因为用户在绘制时需要保持直线完全笔直,或者算法会感知每个像素偏差并将其投影为锯齿状边缘.

                  Compared to Flash-based drawing apps, the lines have slightly jagged edges and appear somewhat blurry. This happens because users need to keep the line perfectly straight while drawing, or the algorithm senses every pixel deviation and projects it as a jagged edge.

                  因此,无法绘制平滑、锐利的圆.

                  Drawing smooth, sharp circles is impossible as a result.

                  不知何故,其他绘图应用程序能够平滑这些锯齿状边缘,同时让用户绘制线条(直线或非直线).

                  Somehow, other drawing apps are able to smooth out these jagged edges while letting users draw lines (straight or not).

                  有没有办法让这些线条变得平滑?

                  Is there a way we can smooth out these lines?

                  演示(选择铅笔工具):http://devfiles.myopera.com/文章/649/example5.html

                  Demo (choose the pencil tool): http://devfiles.myopera.com/articles/649/example5.html

                  我们的应用使用类似的代码.

                  Our app uses similar code.

                  推荐答案

                  这是一个使用二次曲线和'round' lineJoin的快速方法示例:

                  Here's an example of a quick way using quadratic curves and 'round' lineJoin:

                  http://jsfiddle.net/NWBV4/10/

                  这篇关于用户在 HTML5 画布应用程序中绘制的平滑锯齿线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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(我想沿特定路径对对象进行动画处理)

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

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

                        • <legend id='YtwQQ'><style id='YtwQQ'><dir id='YtwQQ'><q id='YtwQQ'></q></dir></style></legend>
                          <tfoot id='YtwQQ'></tfoot>

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

                              <tbody id='YtwQQ'></tbody>