use*_*628 5 graphics fonts android
是否有任何库可以轻松地在图像的不同位置编写文本而无需执行大量数学运算?我需要在左上角的照片上写坐标。我现在看到的唯一方法是使用画布,但是它需要计算坐标,字体大小和其他内容。谢谢。
尝试关注
Bitmap bitmap = ... // Load your bitmap here
Canvas canvas = new Canvas(bitmap);
Paint paint = new Paint();
paint.setColor(Color.BLACK);
paint.setTextSize(10);
canvas.drawText("Some Text here", x, y, paint);
Run Code Online (Sandbox Code Playgroud)
这会帮助你
| 归档时间: |
|
| 查看次数: |
1150 次 |
| 最近记录: |