download:Android工程师

移动端市场份额第一,物联网时代落地载体
Android不只能开发App,Android是一个生态系统
Googl不倒,Android不灭,Android不仅能开发App,在物联网,智能家居,车载设备都大有可为。

        canvas.drawLine(x1, y1, x2, y2, scoreRingPaint);        axisLablePaint.setTextSize(axisLableTextSize);        axisLablePaint.setTextAlign(Paint.Align.CENTER);        axisLablePaint.setColor(mInnerScoreRingColor);        float axisLable_fonth = getFontHeight(axisLablePaint);        float labelRadius =innerScoreDiameter/2 - inner_ringWidth - axisLable_fonth/2 + 3;        float x3 =  (float) (centerX + labelRadius * sinValue);                float y3  =(float) (centerY + labelRadius * cosValue);        canvas.save();        canvas.rotate(90+ degree,x3,y3);    //绘製倾斜文字        canvas.drawText(axisLabelStrs[i],x3,y3 + getFontCenterYToBaseLine(axisLablePaint),axisLablePaint);        canvas.restore();    }    scoreTextPaint.setTextAlign(Paint.Align.CENTER);    scoreTextPaint.setTextSize(scoreTextSize);    scoreTextPaint.setColor(mScoreColor);    double rAngle = Math.toRadians(90 - (-180 + offset_degree));    //弧度    float offset_y = (float)(maxOutterScoreRadius*Math.cos(rAngle));    float scoreBaselineY = centerY + offset_y;    float tempH = getFontTopYToBaseline(scoreTextPaint);    canvas.drawText(nFormat.format(score), centerX, scoreBaselineY, scoreTextPaint);    scoreTextPaint.setTextSize(scoreTitleTextSize);    scoreTextPaint.setColor(mScoreTitleColor);    float scoreTitleBaselineY = scoreBaselineY - tempH - Tool.dpToPx(2);    canvas.drawText(mScoreTitleStr, centerX, scoreTitleBaselineY, scoreTextPaint);}public static float getFontHeight(Paint textPaint){    Paint.FontMetrics fm = textPaint.getFontMetrics();    return (float)Math.ceil(fm.descent - fm.ascent) + 3;}public static float getFontTopYToBaseline(Paint textPaint){    Paint.FontMetrics fm = textPaint.getFontMetrics();    return (float)Math.ceil(-fm.ascent) + 3;}public static float getFontBottomYToBaseline(Paint textPaint){    Paint.FontMetrics fm = textPaint.getFontMetrics();    return (float)Math.ceil(fm.descent) + 3;}public static float getFontCenterYToBaseLine(Paint textPaint){    Paint.FontMetrics fm = textPaint.getFontMetrics();    float fonth = getFontHeight(textPaint);    return (float)Math.abs(Math.ceil(fonth/2- fm.descent));}

©著作权归作者所有:来自51CTO博客作者mb606f2586973a4的原创作品,如需转载,请注明出处,否则将追究法律责任

更多相关文章

  1. 公司DBA关于MySQL开发的一点经验
  2. “360给奔驰挖了19个漏洞”,车联网给***留下的空子要有人来补
  3. CentOS6.8配置GO语言开发环境
  4. 对物联网出勤设备的***测试总结
  5. SQL Server数据库开发必备技能实战
  6. WinForm基于插件开发实现多项配置存储
  7. Django开发中常用的命令总结
  8. 第 82 天:Python Web 开发之 JWT 简介
  9. W EB:一种基于网络嵌入的互联网借贷欺诈预测方法

随机推荐

  1. RadioGroup和RadioButton的使用记录
  2. Android 微信分享,微信分享图片
  3. android :FTPServer
  4. Android示例HelloGallery中R.styleable u
  5. Android实现程序前后台切换效果
  6. android中include标签的使用
  7. Android终于公布源代码
  8. android中悬浮显示可拖动的歌词栏
  9. Android 编程好书推荐
  10. coco2d-x android