Home
last modified time | relevance | path

Searched refs:widthRatio (Results 1 – 2 of 2) sorted by relevance

/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/video/
DCameraVideoActivity.java893 float widthRatio = mNextPreviewSize.width / (float)mPreviewTexWidth; in startPreview() local
896 Log.v(TAG, "startPreview: widthRatio=" + widthRatio + " " + "heightRatio=" + in startPreview()
900 if (heightRatio < widthRatio) { in startPreview()
901 transform.setScale(1, heightRatio / widthRatio); in startPreview()
903 mPreviewTexHeight * (1 - heightRatio / widthRatio) / 2); in startPreview()
905 Log.v(TAG, "startPreview: shrink vertical by " + heightRatio / widthRatio); in startPreview()
908 transform.setScale(widthRatio / heightRatio, 1); in startPreview()
909 transform.postTranslate(mPreviewTexWidth * (1 - widthRatio / heightRatio) / 2, 0); in startPreview()
911 Log.v(TAG, "startPreview: shrink horizontal by " + widthRatio / heightRatio); in startPreview()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/formats/
DCameraFormatsActivity.java514 float widthRatio = mNextPreviewSize.width / (float)mPreviewTexWidth; in startPreview() local
517 if (heightRatio < widthRatio) { in startPreview()
518 transform.setScale(1, heightRatio/widthRatio); in startPreview()
520 mPreviewTexHeight * (1 - heightRatio/widthRatio)/2); in startPreview()
522 transform.setScale(widthRatio/heightRatio, 1); in startPreview()
523 transform.postTranslate(mPreviewTexWidth * (1 - widthRatio/heightRatio)/2, in startPreview()