ImageView setImageMatrix - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ImageView setImageMatrix method.

This code example shows how to use the following methods: layout, getDrawable, setImageMatrix
		scheduleControlTimeout(); 
	} 
 
	private void computeBaseMatrix() 
	{ 
		Drawable d = imageView.getDrawable();
		baseMatrix.reset();
 
		if (d != null) {
			// The base matrix is the matrix that displays the entire image bitmap. 
			// It orients the image when orientation is set and scales in X and Y independently,  
			// so that src matches dst exactly. 
			// This may change the aspect ratio of the src. 
			Rect r = new Rect();
			getDrawingRect(r);
			int intrinsicWidth = d.getIntrinsicWidth();
			int intrinsicHeight = d.getIntrinsicHeight();
			int dwidth = intrinsicWidth;
			int dheight = intrinsicHeight;
 

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setImageMatrix
			} 
			break; 
		} 
 
		// Perform the transformation 
		imgView.setImageMatrix(matrix);
		CheckView(); 
		return true; // indicate event was handled 
	} 
 
    /** 
     * 限制最大最小缩放比例,自动居中 
     */ 
    private void CheckView() { 
        float p[] = new float[9];
        matrix.getValues(p);
        if (mode == ZOOM) {
            if (p[0] < minScaleR) {
                matrix.setScale(minScaleR, minScaleR);
            } 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setImageMatrix
        // 値を取得 
        float value = event.values[0];
        // Matrixに回転する角度と中心座標をセット 
        mMatrix.postRotate(mPreValue - value, mCenterX, mCenterY);
        // 回転! 
        mImageView.setImageMatrix(mMatrix);
        // 今回の値を保持 
        mPreValue = value;
    } 
} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: postScale, setImageMatrix
 
 
 
                        Matrix matrixMove=new Matrix(matrix);
                        matrixMove.postTranslate(newPositionX,newPositionY);
                        Matrix scaleMatrix=new Matrix(matrixMove);
                       // scaleMatrix.postTranslate(newPositionX,newPositionY); 
 
                       // scaleMatrix.postScale(ss,ss); 
                        scaleMatrix.postScale(ss,ss);
                        ((ImageView) v).setImageMatrix(scaleMatrix);
 
                       // action_on_MOVE_DROP(event,v); 
 
 
                    } 
                break; 
 
                case MotionEvent.ACTION_POINTER_DOWN:  oldDist = spacing(event); mode = ZOOM; mpointOld=midPoint(event); break;
                case MotionEvent.ACTION_UP:
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getValues, postScale, set, setScale, setImageMatrix
    		//RectF rectF = new RectF(0, 0, initImageWidth, initImageHeight); 
    		//m.mapRect(rectF); 
    		if (mode == ZOOM) {
            	float newDist = spacing(ev);
                if (newDist > 10f) {
                    matrix.set(savedMatrix);
                    float tScale = newDist / dist;
                    if(tScale>=0.35f) {
                    	matrix.postScale(tScale, tScale, mid.x, mid.y);
                    } 
                } 
            } 
    		 
			final int pointerIndex = ev.findPointerIndex(mActivePointerId);
			final float x = ev.getX();
			final float y = ev.getY();
			final int xDiff = (int) Math.abs(x - mLastMotionX);
			final int yDiff = (int) Math.abs(y - mLastMotionY);
 
			final int touchSlop = mTouchSlop;

5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related ImageView setImageMatrix Questions & Answers:

setImageMatrix Method Overview
See Code Examples for other Android ImageView Methods: