Refact PaintGestureListener.