//显示单位文字
Paint clTxtPaint = new Paint();
clTxtPaint.setTextSize(hintSize);
clTxtPaint.setColor(Color.parseColor("#333333"));
clTxtPaint.setTextAlign(Paint.Align.CENTER);
RectF r2=new RectF ();
Paint.FontMetrics fm = clTxtPaint.getFontMetrics();
canvas.drawText("开始测量", r2.centerX(), r2.centerY()- (fm.descent - (-fm.ascent + fm.descent)/2),clTxtPaint);
网友评论