¡@

Home 

2014/10/16 ¤W¤È 08:23:30

android Programming Glossary: scalex

Canvas Pinch-Zoom to Point Within Bounds

http://stackoverflow.com/questions/11339190/canvas-pinch-zoom-to-point-within-bounds

to your screen size Fit to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight.. float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale setImageMatrix matrix saveScale..

Android Gallery zoom in/out

http://stackoverflow.com/questions/11468536/android-gallery-zoom-in-out

new AnimatorSet set.playTogether ObjectAnimator.ofFloat g scaleX zoom ObjectAnimator.ofFloat g scaleY zoom set.addListener new..

Android Pinch and Zoom Image in Activity

http://stackoverflow.com/questions/13210443/android-pinch-and-zoom-image-in-activity

heightMeasureSpec Fit to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight.. float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale setImageMatrix matrix saveScale..

Rotate View Hierarchy 90 degrees

http://stackoverflow.com/questions/3444764/rotate-view-hierarchy-90-degrees

the new screen size. This is not what I want. float scaleX float getHeight getWidth float scaleY float getWidth getHeight.. float scaleY float getWidth getHeight canvas.scale scaleX scaleY getWidth 2 getHeight 2 mForward canvas.getMatrix mForward.invert..

Sideways View with XML Android

http://stackoverflow.com/questions/3774770/sideways-view-with-xml-android

to rotation there is rotationX rotationY pivotX pivotY scaleX scaleY and translationX translationY. I haven't played with..

Trying to get the display size of an image in an ImageView

http://stackoverflow.com/questions/3855218/trying-to-get-the-display-size-of-an-image-in-an-imageview

values using the constants if aspect ratio maintained scaleX scaleY final float scaleX f Matrix.MSCALE_X final float scaleY.. if aspect ratio maintained scaleX scaleY final float scaleX f Matrix.MSCALE_X final float scaleY f Matrix.MSCALE_Y Get the.. the actual dimensions final int actW Math.round origW scaleX final int actH Math.round origH scaleY Log.e DBG origW origH..

Android image view matrix scale + translate

http://stackoverflow.com/questions/6075363/android-image-view-matrix-scale-translate

is the code Compute the scale to choose this works float scaleX float displayWidth float imageWidth float scaleY float displayHeight.. displayHeight float imageHeight float minScale Math.min scaleX scaleY tx ty should be the translation to take the image back..

Android Bitmap/Canvas offset after scale

http://stackoverflow.com/questions/6835224/android-bitmap-canvas-offset-after-scale

try to work out the best formula for this canvas.scale scaleX scaleY pivotX pivotY if scaleX 1 objectNewX objectOldX objectOldX.. for this canvas.scale scaleX scaleY pivotX pivotY if scaleX 1 objectNewX objectOldX objectOldX pivotX scaleX 1 else objectNewX.. pivotY if scaleX 1 objectNewX objectOldX objectOldX pivotX scaleX 1 else objectNewX objectOldX objectOldX pivotX 1 scaleX The..

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

heightMeasureSpec Fit to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight.. float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale setImageMatrix matrix saveScale..

Canvas Pinch-Zoom to Point Within Bounds

http://stackoverflow.com/questions/11339190/canvas-pinch-zoom-to-point-within-bounds

MeasureSpec.getSize heightMeasureSpec Change this according to your screen size Fit to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale.. to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale setImageMatrix matrix saveScale 1f scaleMappingRatio saveScale scale Center the image..

Android Gallery zoom in/out

http://stackoverflow.com/questions/11468536/android-gallery-zoom-in-out

boolean increase Log.i TAG startig animation AnimatorSet set new AnimatorSet set.playTogether ObjectAnimator.ofFloat g scaleX zoom ObjectAnimator.ofFloat g scaleY zoom set.addListener new AnimatorListener @Override public void onAnimationStart Animator..

Android Pinch and Zoom Image in Activity

http://stackoverflow.com/questions/13210443/android-pinch-and-zoom-image-in-activity

MeasureSpec.getSize widthMeasureSpec height MeasureSpec.getSize heightMeasureSpec Fit to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale.. to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale setImageMatrix matrix saveScale 1f Center the image redundantYSpace float height scale..

Rotate View Hierarchy 90 degrees

http://stackoverflow.com/questions/3444764/rotate-view-hierarchy-90-degrees

2 getHeight 2 This code will stretch the canvas to accommodate the new screen size. This is not what I want. float scaleX float getHeight getWidth float scaleY float getWidth getHeight canvas.scale scaleX scaleY getWidth 2 getHeight 2 mForward.. This is not what I want. float scaleX float getHeight getWidth float scaleY float getWidth getHeight canvas.scale scaleX scaleY getWidth 2 getHeight 2 mForward canvas.getMatrix mForward.invert mReverse canvas.save canvas.setMatrix mForward This..

Sideways View with XML Android

http://stackoverflow.com/questions/3774770/sideways-view-with-xml-android

in API 11 which tweaks this property from code. And in addition to rotation there is rotationX rotationY pivotX pivotY scaleX scaleY and translationX translationY. I haven't played with any of them yet. There is a list of all the changes in API 11..

Trying to get the display size of an image in an ImageView

http://stackoverflow.com/questions/3855218/trying-to-get-the-display-size-of-an-image-in-an-imageview

f new float 9 getImageMatrix .getValues f Extract the scale values using the constants if aspect ratio maintained scaleX scaleY final float scaleX f Matrix.MSCALE_X final float scaleY f Matrix.MSCALE_Y Get the drawable could also get the bitmap.. .getValues f Extract the scale values using the constants if aspect ratio maintained scaleX scaleY final float scaleX f Matrix.MSCALE_X final float scaleY f Matrix.MSCALE_Y Get the drawable could also get the bitmap behind the drawable and.. final int origH d.getIntrinsicHeight Calculate the actual dimensions final int actW Math.round origW scaleX final int actH Math.round origH scaleY Log.e DBG origW origH actW actH scales x scaleX y scaleY Note To get the image transformation..

Android image view matrix scale + translate

http://stackoverflow.com/questions/6075363/android-image-view-matrix-scale-translate

the image centered in the view scale is appropriate . Here is the code Compute the scale to choose this works float scaleX float displayWidth float imageWidth float scaleY float displayHeight float imageHeight float minScale Math.min scaleX scaleY.. scaleX float displayWidth float imageWidth float scaleY float displayHeight float imageHeight float minScale Math.min scaleX scaleY tx ty should be the translation to take the image back to the screen center float tx Math.max 0 0.5f float displayWidth..

Android Bitmap/Canvas offset after scale

http://stackoverflow.com/questions/6835224/android-bitmap-canvas-offset-after-scale

graphics android canvas share improve this question Ok lets try to work out the best formula for this canvas.scale scaleX scaleY pivotX pivotY if scaleX 1 objectNewX objectOldX objectOldX pivotX scaleX 1 else objectNewX objectOldX objectOldX.. improve this question Ok lets try to work out the best formula for this canvas.scale scaleX scaleY pivotX pivotY if scaleX 1 objectNewX objectOldX objectOldX pivotX scaleX 1 else objectNewX objectOldX objectOldX pivotX 1 scaleX The same for objectNewY... the best formula for this canvas.scale scaleX scaleY pivotX pivotY if scaleX 1 objectNewX objectOldX objectOldX pivotX scaleX 1 else objectNewX objectOldX objectOldX pivotX 1 scaleX The same for objectNewY. The new width and height of the bitmap..

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

MeasureSpec.getSize widthMeasureSpec height MeasureSpec.getSize heightMeasureSpec Fit to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale.. to screen. float scale float scaleX float width float bmWidth float scaleY float height float bmHeight scale Math.min scaleX scaleY matrix.setScale scale scale setImageMatrix matrix saveScale 1f Center the image redundantYSpace float height scale..