download:Java异常与调优一站式解决方案
项目异常不断,找不到问题所在?百度、Google搜个遍,也找不到答案?本课程针对Java开发中常见的各种异常,从日志、堆栈再深入到JVM,带你发现问题、定位问题、解决问题,最后在实战中搭建开箱即用的SpringBoot脚手架,强化巩固所学,助力你提升开发技能!
技术要求
基本的Java语法
理解Spring的思想和理念
环境参数
JDK 1.8、
SpringBoot 2.1.4.RELEASE
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));
}