Code example for Matrix

Methods: postScalepostTranslatesetScale

        // Zoom out to at most 1x. 
        Matrix tmp = new Matrix(mSuppMatrix);
        tmp.postScale(1F / rate, 1F / rate, cx, cy);
        if (getScale(tmp) < 1F) {
            mSuppMatrix.setScale(1F, 1F, cx, cy);
        } else { 
            mSuppMatrix.postScale(1F / rate, 1F / rate, cx, cy);
        center(true, true); 
    protected void postTranslate(float dx, float dy) {
        mSuppMatrix.postTranslate(dx, dy);
    protected void panBy(float dx, float dy) {
        postTranslate(dx, dy);
Stop searching for code, let great code find you!  Add Codota to your java IDE