提交 e97e8d69 编写于 作者: H huangziwei

开放个别接口

上级 ed9e110a
......@@ -18,7 +18,7 @@ public class GraffitiPath implements Undoable {
Path mPath; // 画笔的路径
float mSx, mSy; // 映射后的起始坐标,(手指点击)
float mDx, mDy; // 映射后的终止坐标,(手指抬起)
Matrix mMatrix = new Matrix(); // 图片的偏移矩阵
private Matrix mMatrix = new Matrix(); // 图片的偏移矩阵
int mRotateDegree = 0; // 旋转的角度(围绕图片中心旋转)
float mPivotX, mPivotY;
CopyLocation mCopy;
......
......@@ -16,8 +16,8 @@ public class GraffitiText implements Undoable {
private String mText;
private float mSize;
private GraffitiColor mColor;
private float mTextRotate;
private int mRotateDegree;
private float mTextRotate; // 文字的旋转角度
private int mRotateDegree; // 图片的旋转角度
float mPivotX, mPivotY;
private float mX, mY;
......
......@@ -771,22 +771,30 @@ public class GraffitiView extends View {
return -graffitiY * (mPrivateScale * mScale) + touchY - mCentreTranY;
}
private void addPath(GraffitiPath path) {
public CopyOnWriteArrayList<GraffitiPath> getPathStack() {
return mPathStack;
}
public CopyOnWriteArrayList<GraffitiText> getTextStack() {
return mTextStack;
}
public final void addPath(GraffitiPath path) {
mPathStack.add(path);
mUndoStack.add(path);
}
private void removePath(GraffitiPath path) {
public final void removePath(GraffitiPath path) {
mPathStack.remove(path);
mUndoStack.remove(path);
}
private void addText(GraffitiText text) {
public final void addText(GraffitiText text) {
mTextStack.add(text);
mUndoStack.add(text);
}
private void removeText(GraffitiText text) {
public final void removeText(GraffitiText text) {
mTextStack.remove(text);
mUndoStack.remove(text);
}
......@@ -1324,4 +1332,11 @@ public class GraffitiView extends View {
invalidate();
}
public float getOriginalPivotX() {
return mOriginalPivotX;
}
public float getOriginalPivotY() {
return mOriginalPivotY;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册