可能重复: 如何写曲文?
我要呈现的文本在给定的图像(到位AMEX 3)。请告诉我如何做到这一点。
I want to render text as in given image (in place of "AMEX 3"). Please tell me how to achieve this.
创建了一轮路径 - 对象,然后在自定义画布使用drawTextOnPath.
Create a round Path - object, and then in a custom canvas use drawTextOnPath.
Path path = new Path();
path.addCircle(x, y, radius, Path.Direction.CW);
myCanvas.drawTextOnPath(myText, path, offset, 0, myPaint);
myCanvas现在应该包含弧形文本。
myCanvas should now contain the curved text.