android Programming Glossary: matrix.getvalues
Draw Rectangle Over ImageView for highlight that can be zoom in-out in android http://stackoverflow.com/questions/10482229/draw-rectangle-over-imageview-for-highlight-that-can-be-zoom-in-out-in-android r b protected float getValue Matrix matrix int whichValue matrix.getValues mMatrixValues return mMatrixValues whichValue New Added protected..
Canvas Pinch-Zoom to Point Within Bounds http://stackoverflow.com/questions/11339190/canvas-pinch-zoom-to-point-within-bounds mScaleFactor width 2 height 2 if mScaleFactor 1 matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor.. mScaleFactor detector.getFocusX detector.getFocusY matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor..
Android Pinch and Zoom Image in Activity http://stackoverflow.com/questions/13210443/android-pinch-and-zoom-image-in-activity v MotionEvent event mScaleDetector.onTouchEvent event matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y PointF.. mScaleFactor width 2 height 2 if mScaleFactor 1 matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if.. mScaleFactor detector.getFocusX detector.getFocusY matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if..
Getting coordinates and width/height from a matrix http://stackoverflow.com/questions/5286174/getting-coordinates-and-width-height-from-a-matrix Turns out the solution is simple float values new float 9 matrix.getValues values globalX values Matrix.MTRANS_X globalY values Matrix.MTRANS_Y..
Rotate zoom drag image in android imageview http://stackoverflow.com/questions/5894736/rotate-zoom-drag-image-in-android-imageview end of return public void fixing float value new float 9 matrix.getValues value float savedValue new float 9 savedMatrix2.getValues savedValue..
How to enable the (two finger) zoom in/out feature for an image in android [duplicate] http://stackoverflow.com/questions/7582833/how-to-enable-the-two-finger-zoom-in-out-feature-for-an-image-in-android 10f matrix.set savedMatrix float scale newDist oldDist matrix.getValues matrixValues float currentScale matrixValues Matrix.MSCALE_X..
How do I modify TouchImageView with double tap to zoom in and out? http://stackoverflow.com/questions/7704086/how-do-i-modify-touchimageview-with-double-tap-to-zoom-in-and-out event return true mScaleDetector.onTouchEvent event matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y PointF.. mScaleFactor width 2 height 2 if mScaleFactor 1 matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if.. mScaleFactor detector.getFocusX detector.getFocusY matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor..
Android ImageView - Get coordinates of tap (click) regardless of scroll location or zoom scale http://stackoverflow.com/questions/8002298/android-imageview-get-coordinates-of-tap-click-regardless-of-scroll-location Get the values of the matrix float values new float 9 matrix.getValues values values 2 and values 5 are the x y coordinates of the..
Draw Rectangle Over ImageView for highlight that can be zoom in-out in android http://stackoverflow.com/questions/10482229/draw-rectangle-over-imageview-for-highlight-that-can-be-zoom-in-out-in-android mScale mWidth 2 mHeight 2 cutting return super.setFrame l t r b protected float getValue Matrix matrix int whichValue matrix.getValues mMatrixValues return mMatrixValues whichValue New Added protected float getCanvasValue Matrix matrix int whichvalues mCanvasMatrix.getValues..
Canvas Pinch-Zoom to Point Within Bounds http://stackoverflow.com/questions/11339190/canvas-pinch-zoom-to-point-within-bounds width origHeight saveScale height matrix.postScale mScaleFactor mScaleFactor width 2 height 2 if mScaleFactor 1 matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor 1 if Math.round origWidth saveScale width if y bottom.. x 0 matrix.postTranslate x 0 else matrix.postScale mScaleFactor mScaleFactor detector.getFocusX detector.getFocusY matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor 1 if x right matrix.postTranslate x right 0 else..
Android Pinch and Zoom Image in Activity http://stackoverflow.com/questions/13210443/android-pinch-and-zoom-image-in-activity new OnTouchListener @Override public boolean onTouch View v MotionEvent event mScaleDetector.onTouchEvent event matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y PointF curr new PointF event.getX event.getY switch event.getAction.. width origHeight saveScale height matrix.postScale mScaleFactor mScaleFactor width 2 height 2 if mScaleFactor 1 matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor 1 if Math.round origWidth saveScale width .. x 0 else matrix.postScale mScaleFactor mScaleFactor detector.getFocusX detector.getFocusY matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor 1 if x right matrix.postTranslate x right 0..
Getting coordinates and width/height from a matrix http://stackoverflow.com/questions/5286174/getting-coordinates-and-width-height-from-a-matrix width and height android share improve this question Turns out the solution is simple float values new float 9 matrix.getValues values globalX values Matrix.MTRANS_X globalY values Matrix.MTRANS_Y width values Matrix.MSCALE_X imageWidth height values..
Rotate zoom drag image in android imageview http://stackoverflow.com/questions/5894736/rotate-zoom-drag-image-in-android-imageview fixing setImageMatrix savedMatrix2 before the end of return public void fixing float value new float 9 matrix.getValues value float savedValue new float 9 savedMatrix2.getValues savedValue int width getWidth int height getHeight Drawable d..
How to enable the (two finger) zoom in/out feature for an image in android [duplicate] http://stackoverflow.com/questions/7582833/how-to-enable-the-two-finger-zoom-in-out-feature-for-an-image-in-android newDist spacing event Log.d TAG newDist newDist if newDist 10f matrix.set savedMatrix float scale newDist oldDist matrix.getValues matrixValues float currentScale matrixValues Matrix.MSCALE_X limit zoom if scale currentScale maxZoom scale maxZoom currentScale..
How do I modify TouchImageView with double tap to zoom in and out? http://stackoverflow.com/questions/7704086/how-do-i-modify-touchimageview-with-double-tap-to-zoom-in-and-out View v MotionEvent event if gestureDetector.onTouchEvent event return true mScaleDetector.onTouchEvent event matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y PointF curr new PointF event.getX event.getY switch event.getAction.. width origHeight saveScale height matrix.postScale mScaleFactor mScaleFactor width 2 height 2 if mScaleFactor 1 matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor 1 if Math.round origWidth saveScale width if.. 0 matrix.postTranslate x 0 else matrix.postScale mScaleFactor mScaleFactor detector.getFocusX detector.getFocusY matrix.getValues m float x m Matrix.MTRANS_X float y m Matrix.MTRANS_Y if mScaleFactor 1 if x right matrix.postTranslate x right 0 else..
Android ImageView - Get coordinates of tap (click) regardless of scroll location or zoom scale http://stackoverflow.com/questions/8002298/android-imageview-get-coordinates-of-tap-click-regardless-of-scroll-location was only right to share what I learned. Hope this helps somebody Get the values of the matrix float values new float 9 matrix.getValues values values 2 and values 5 are the x y coordinates of the top left corner of the drawable image regardless of the zoom..
|