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

      <legend id='7je2Q'><style id='7je2Q'><dir id='7je2Q'><q id='7je2Q'></q></dir></style></legend>

      1. <small id='7je2Q'></small><noframes id='7je2Q'>

      2. 光栅化二维多边形

        Rasterizing a 2D polygon(光栅化二维多边形)

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

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

                  <tbody id='odBvJ'></tbody>
                  <bdo id='odBvJ'></bdo><ul id='odBvJ'></ul>
                  <legend id='odBvJ'><style id='odBvJ'><dir id='odBvJ'><q id='odBvJ'></q></dir></style></legend>
                  <tfoot id='odBvJ'></tfoot>

                  本文介绍了光栅化二维多边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要从表示为点列表的封闭二维多边形创建二进制位图.能否请您指出高效且足够简单的算法来做到这一点,或者甚至更好一些 C++ 代码?

                  I need to create a binary bitmap from a closed 2D polygon represented as a list of points. Could you please point me to efficient and sufficiently simple algorithms to do that, or, even better, some C++ code?

                  非常感谢!

                  PS:我想避免向我的项目添加依赖项.不过如果你推荐一个开源库,我可以随时查看代码,所以它也很有用.

                  PS: I would like to avoid adding a dependency to my project. However if you suggest an open-source library, I can always look at the code, so it can be useful too.

                  推荐答案

                  你想要的神奇谷歌短语是非零缠绕规则"或偶数奇数多边形填充".

                  The magic google phrase you want is either "non-zero winding rule" or "even odd polygon fill".

                  查看维基百科条目:

                  • 非零缠绕规则
                  • 偶数多边形填充

                  两者都非常容易实现并且对于大多数用途来说足够快.稍微聪明一点,它们也可以进行抗锯齿处理.

                  Both are very easy to implement and sufficiently fast for most purposes. With some cleverness, they can be made antialiased as well.

                  这篇关于光栅化二维多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Constructor initialization Vs assignment(构造函数初始化 Vs 赋值)
                  Is a `=default` move constructor equivalent to a member-wise move constructor?(`=default` 移动构造函数是否等同于成员移动构造函数?)
                  Has the new C++11 member initialization feature at declaration made initialization lists obsolete?(声明时新的 C++11 成员初始化功能是否使初始化列表过时了?)
                  Order of constructor call in virtual inheritance(虚继承中构造函数调用的顺序)
                  How to use sfinae for selecting constructors?(如何使用 sfinae 选择构造函数?)
                  Initializing a union with a non-trivial constructor(使用非平凡的构造函数初始化联合)

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

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

                            <tbody id='qXxD1'></tbody>
                        1. <tfoot id='qXxD1'></tfoot>

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