Android工程师

Android工程师,第1张

概述download:Android工程师移动端市场份额第一,物联网时代落地载体Android不只能开发App,Android是一个生态系统Googl不倒,Android不灭,Android不仅能开发App,在物联网,智能家居,车载设备都大有可为。canvas.drawLine(x1,y1,x2,y2,scoreRingPaint);axisLablePaint.se 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));}

总结

以上是内存溢出为你收集整理的Android工程师全部内容,希望文章能够帮你解决Android工程师所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1019488.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存