文字图像转换 [英] text to image conversion
本文介绍了文字图像转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚成功在呼唤文本从SD卡第一个文本文件中的行,并得到了它的显示文本出来TextView的通过申请,
i just succeeded in calling a line of text from a text file in th sdcard and got it to display the text out on the application via textview,
有反正在那里我可以从文本阅读的字符,然后让它显示字符下方的图片
is there anyway where i could read the characters from the text and then get it to display a image below the character
像一个文字图像转换权文本的每一行下方
like an text to image conversion right below each line of text
文字很短,简单的词
在此先感谢
推荐答案
您可以手动创建一个位图,并使用颜料和画布类绘制文本到它
You can create a bitmap manually and draw text into it using the Paint and Canvas classes
事情是这样的:
Bitmap bitmap = Bitmap.createBitmap(30, 30, Bitmap.Config.ARGB_8888);
Paint paint = new Paint();
Canvas canvas = new Canvas(bitmap);
canvas.drawText("TEXT", 0, 0, paint);
这篇关于文字图像转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文