如何在libgdx中绘制扭曲文本?

时间:2015-06-25 08:57:33

标签: java libgdx

如何在libgdx中绘制像这张图片一样的扭曲文本?

50.000 and still counting

2 个答案:

答案 0 :(得分:1)

有不同的方法可以做到这一点 - 它们并不是libgdx的标准,所以你必须自己实现。

  1. 将文字转换为轮廓。扭曲每个坐标。使用这些扭曲坐标绘制多边形对象。这就是Adobe Illustrator和CorelDraw等专业软件。

  2. 将文本绘制到位图中。扭曲位图。为了获得更好的结果,请以两倍的输出大小绘制位图,以便您可以使用子采样。

  3. (基于样本图像的质量相当差)绘制略微旋转的每个字符。您可以根据字符总数(快速,脏和简单)确定旋转量,或者通过使用每个字符的各个宽度来确定其在整个字符串中的相对位置,并根据数量进行略微改进。对此的轮换。

答案 1 :(得分:-1)

Are you going to use this picture for some motion or you just need it for display? If it's the latter why don't you just draw it in gimp, photoshop or even paint and position it/scale it on where you need it on the screen as normal sprite/actor?

相关问题