摘要: int circleXY = (int) (mWidth / 2); int circleRadius = (int) ((mWidth * 0.5) / 2) + 20; //计算文本宽度 int textWidth = getTextWidth(mTextPaint,mText); //计算baseline:垂直... 阅读全文
posted @ 2017-06-15 15:01 ha_cjy 阅读(2058) 评论(0) 推荐(0) 编辑
摘要: /** * 方法1:获取文本的宽度 * @param paint * @param str * @return */ public static int getTextWidth(Paint paint, String str) { int iRet = 0; if (str != null && str.... 阅读全文
posted @ 2017-06-15 14:59 ha_cjy 阅读(326) 评论(0) 推荐(0) 编辑