/** * Get the current position and scale of the selected image. Called whenever a drag starts or is * reset. */ public void getPositionAndScale(Img img, PositionAndScale objPosAndScaleOut) { // FIXME affine-izem (and fix the fact that the anisotropic_scale part requires averaging the // two scale factors) objPosAndScaleOut.set( img.getCenterX(), img.getCenterY(), (mUIMode & UI_MODE_ANISOTROPIC_SCALE) == 0, (img.getScaleX() + img.getScaleY()) / 2, (mUIMode & UI_MODE_ANISOTROPIC_SCALE) != 0, img.getScaleX(), img.getScaleY(), (mUIMode & UI_MODE_ROTATE) != 0, img.getAngle()); }
/*----------------------getPositionAndScale--------------------------------------------------------------------*/ public void getPositionAndScale(KiwiGLSurfaceView obj, PositionAndScale pos) { float xOff = 0.0f; float yOff = 0.0f; float scale = 1.0f; float scaleX = 1.0f; float scaleY = 1.0f; float angle = 0.0f; boolean updateScale = true; boolean updateAngle = true; boolean updateScaleXY = false; Log.d(TAG, "getPositionAndScale"); pos.set(xOff, yOff, updateScale, scale, updateScaleXY, scaleX, scaleY, updateAngle, angle); this.mLastTouchInfo = null; }
/* (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.getScaleFactorRaw(), false, 0, 0, false, 0); }