Code example for Matrix

Methods: postScale, set

0
                        float y = event.getY() - mStartPoint.y;
                        mMatrix.postTranslate(x, y);
                    } else if (mMode == ZOOM) {
                        float newDist = culcDistance(event);
                        float scale = newDist / mOldDistance;
                        mMatrix.set(mSavedMatrix);
                        mMatrix.postScale(scale, scale,
                                          mMidPoint.x, mMidPoint.y);
                    } 
                    break; 
 
                // タッチ終了 
                case MotionEvent.ACTION_UP:
                    mMode = NONE;
                    break; 
 
                // マルチタッチ開始(ズーム開始) 
                case MotionEvent.ACTION_POINTER_DOWN:
                    mMode = ZOOM;
                    mOldDistance = culcDistance(event);
                    culcMidPoint(mMidPoint, event);