问题描述
- android rolate旋转角度90度,无变化
-
代码如下?用了旋转但是效果和没用一样protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub int mCircleXY = getMeasuredWidth(); int mRadius = (int) (mCircleXY / 2); RectF mRectF = new RectF(0, 0, mCircleXY, mCircleXY); Paint p = new Paint(); p.setStyle(Style.FILL); p.setColor(mColor); // 绘制一个圆弧 canvas.drawArc(mRectF, 270, sweap, true, p); canvas.save(); // 旋转90度,然而没有效果 canvas.rotate(90, mCircleXY / 2, mCircleXY / 2); super.onDraw(canvas); canvas.restore(); }
解决方案
android 旋转角度总结
android获取图片的旋转角度
时间: 2024-10-22 17:49:47