private final Rect mInvalidRect = new Rect();
private final Path mPath = new Path();
+ private boolean mGestureVisible;
private float mX;
private float mY;
return mCurrentGesture;
}
- public long getFadeOffset() {
- return mFadeOffset;
- }
-
- public void setFadeOffset(long fadeOffset) {
- mFadeOffset = fadeOffset;
- }
-
public void setGesture(Gesture gesture) {
if (mCurrentGesture != null) {
clear(false);
invalidate();
}
+ public Path getGesturePath() {
+ return mPath;
+ }
+
+ public Path getGesturePath(Path path) {
+ path.set(mPath);
+ return path;
+ }
+
+ public boolean isGestureVisible() {
+ return mGestureVisible;
+ }
+
+ public void setGestureVisible(boolean visible) {
+ mGestureVisible = visible;
+ }
+
+ public long getFadeOffset() {
+ return mFadeOffset;
+ }
+
+ public void setFadeOffset(long fadeOffset) {
+ mFadeOffset = fadeOffset;
+ }
+
public void addOnGestureListener(OnGestureListener listener) {
mOnGestureListeners.add(listener);
}
public void draw(Canvas canvas) {
super.draw(canvas);
- if (mCurrentGesture != null) {
+ if (mCurrentGesture != null && mGestureVisible) {
canvas.drawPath(mPath, mGesturePaint);
}
}