1. <small id='c7Lxc'></small><noframes id='c7Lxc'>

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

    • <bdo id='c7Lxc'></bdo><ul id='c7Lxc'></ul>
      <legend id='c7Lxc'><style id='c7Lxc'><dir id='c7Lxc'><q id='c7Lxc'></q></dir></style></legend>
    1. libgdx- pixmap:我能以某种方式改变线条的宽度吗?

      时间:2023-05-19
    2. <small id='qXyVw'></small><noframes id='qXyVw'>

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

              <bdo id='qXyVw'></bdo><ul id='qXyVw'></ul>
                <legend id='qXyVw'><style id='qXyVw'><dir id='qXyVw'><q id='qXyVw'></q></dir></style></legend>

                  <tbody id='qXyVw'></tbody>
                <i id='qXyVw'><tr id='qXyVw'><dt id='qXyVw'><q id='qXyVw'><span id='qXyVw'><b id='qXyVw'><form id='qXyVw'><ins id='qXyVw'></ins><ul id='qXyVw'></ul><sub id='qXyVw'></sub></form><legend id='qXyVw'></legend><bdo id='qXyVw'><pre id='qXyVw'><center id='qXyVw'></center></pre></bdo></b><th id='qXyVw'></th></span></q></dt></tr></i><div id='qXyVw'><tfoot id='qXyVw'></tfoot><dl id='qXyVw'><fieldset id='qXyVw'></fieldset></dl></div>
                本文介绍了libgdx- pixmap:我能以某种方式改变线条的宽度吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我想画一条线,然后生成一个纹理(使用 libgdx).我发现使用 pixmap 从圆形、矩形和线条创建纹理很简单.但是我没有找到如何设置绘制形状的线宽.是否可以设置像素图的线宽?

                I want to draw a line and then generate a texture (with libgdx). I found out that creating a texture from circles, rectangles and lines is simple with pixmap. But I didn't find out how to set the linewidth of the drawn shape. Is there any possibility to set the linewidth for pixmap?

                这是我目前得到的代码:(我试着画了两个实心圆圈并用一条线连接它们)

                Here is the code I got so far: (I tried to draw two filled circles and to connect them with a line)

                Pixmap pixmap = new Pixmap( 16, 16, Format.RGBA8888 );
                pixmap.setColor(Color.BLUE);
                pixmap.fillCircle(x1, y1, 10);
                pixmap.fillCircle(x2, y2, 10);
                pixmap.drawLine(x2, y2, x1, y1); // this line is very thin
                Texture pixmaptex = new Texture( pixmap );
                pixmap.dispose();
                

                推荐答案

                OpenGL 实现不可靠地支持线宽.要绘制粗"线,请绘制一个矩形.

                Linewidth isn't reliably supported by OpenGL implementations. To draw "fat" lines, draw a rectangle.

                请参阅 Libgdx gl10.glLineWidth()

                这篇关于libgdx- pixmap:我能以某种方式改变线条的宽度吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Libgdx Orthographic Camera 初始位置 下一篇:导入 com.badlogic.gdx.graphics.gl10 无法解析

                相关文章

                最新文章

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

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

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

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