140513 Android中Paint字体的使用、paint.setAntiAlias(ture)
1、Android中Paint字体的使用
http://my.oschina.net/quttap/blog/124095
2、paint.setAntiAlias(ture):
抗锯齿方法两种(其一:paint.setAntiAlias(ture);paint.setBitmapFilter(true))
http://doublekj.blog.163.com/blog/static/146818474201171555942247/
/** 获取分割线 */
private static String getSpilLineText(PrintModel model) {
Paint paint = getTextPaint(model._fontSize_center, 0);
Rect bounds = new Rect();
String spil = "----------------------------";
paint.getTextBounds(spil, 0, spil.length(), bounds);
while (bounds.width() < PAGE_SIZE - 16) {
spil += "-";
paint.getTextBounds(spil, 0, spil.length(), bounds);
}
return spil + "\n";
}
阅读(1858) | 评论(0) | 转发(0) |