Chinaunix首页 | 论坛 | 博客
  • 博客访问: 199414
  • 博文数量: 102
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1015
  • 用 户 组: 普通用户
  • 注册时间: 2013-06-05 16:45
文章存档

2014年(73)

2013年(29)

我的朋友

分类: Android平台

2014-05-13 18:40:45

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";
}
阅读(1763) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~