提交 8963c411 编写于 作者: H huangziwei

修改变量名及添加注释

上级 9620234c
......@@ -28,12 +28,12 @@ public abstract class GraffitiSelectableItem implements Undoable {
private Rect mRect = new Rect();
public GraffitiSelectableItem(GraffitiView.Pen pen, float size, GraffitiColor color, int textRotate, int rotateDegree, float x, float y, float px, float py) {
public GraffitiSelectableItem(GraffitiView.Pen pen, float size, GraffitiColor color, int itemRotate, int graffitiDegree, float x, float y, float px, float py) {
this.mPen = pen;
this.mSize = size;
this.mColor = color;
this.mItemRotate = textRotate;
this.mGraffitiDegree = rotateDegree;
this.mItemRotate = itemRotate;
this.mGraffitiDegree = graffitiDegree;
this.mX = x;
this.mY = y;
this.mPivotX = px;
......
......@@ -335,7 +335,7 @@ public class GraffitiView extends View {
mTouchX = event.getX();
mTouchY = event.getY();
if (isPenSelectable()) {
if (isPenSelectable()) { //画笔是否是可选择的
if (mIsRotatingSelectedItem) {
float[] xy = mSelectedItem.getXy(mGraffitiRotateDegree);
mSelectedItem.setItemRotate(mRotateTextDiff + computeAngle(
......@@ -640,7 +640,7 @@ public class GraffitiView extends View {
canvas.translate(xy[0], xy[1]); // 把坐标系平移到文字矩形范围
canvas.rotate(mGraffitiRotateDegree - selectableItem.getGraffitiRotate() + selectableItem.getItemRotate(), 0, 0); // 旋转坐标系
// 在变换后的坐标系中画出文字
// 在变换后的坐标系中画出selectableItem
if (selectableItem == mSelectedItem) {
Rect rect = selectableItem.getBounds(mGraffitiRotateDegree);
mPaint.setShader(null);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册