/* (non-Javadoc) * @see com.ds.avare.MultiTouchController.MultiTouchObjectCanvas#setPositionAndScale(java.lang.Object, com.ds.avare.MultiTouchController.PositionAndScale, com.ds.avare.MultiTouchController.PointInfo) */ public boolean setPositionAndScale( Object obj, PositionAndScale newObjPosAndScale, PointInfo touchPoint) { touchPointChanged(touchPoint); if (false == mCurrTouchPoint.isMultiTouch()) { /* * Multi-touch is zoom, single touch is pan */ if (mPan.setMove(newObjPosAndScale.getXOff(), newObjPosAndScale.getYOff())) { /* * Query when we have moved one tile. This will happen in background. */ dbquery(true); } } else { /* * Clamp scaling. */ mPoint = null; /* this is to not support mPoint distance when zooming */ mScale.setScaleFactor(newObjPosAndScale.getScale()); } tfrReset(); invalidate(); return true; }
/* (non-Javadoc) * @see com.ds.avare.MultiTouchController.MultiTouchObjectCanvas#getPositionAndScale(java.lang.Object, com.ds.avare.MultiTouchController.PositionAndScale) */ public void getPositionAndScale(Object obj, PositionAndScale objPosAndScaleOut) { objPosAndScaleOut.set( mPan.getMoveX(), mPan.getMoveY(), true, mScale.getScaleFactor(), false, 0, 0, false, 0); }