Home
last modified time | relevance | path

Searched refs:width (Results 1 – 25 of 98) sorted by relevance

1234

/developers/build/prebuilts/gradle/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 if (mRatioWidth == width && mRatioHeight == height) { in setAspectRatio()
58 mRatioWidth = width; in setAspectRatio()
66 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
69 setMeasuredDimension(width, height); in onMeasure()
71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
72 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/samples/android/media/Camera2Raw/Application/src/main/java/com/example/android/camera2raw/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 if (mRatioWidth == width && mRatioHeight == height) { in setAspectRatio()
58 mRatioWidth = width; in setAspectRatio()
66 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
69 setMeasuredDimension(width, height); in onMeasure()
71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
72 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/samples/android/media/Camera2Video/kotlinApp/Application/src/main/java/com/example/android/camera2video/
DAutoFitTextureView.kt44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio()
45 if (width < 0 || height < 0) { in setAspectRatio()
48 ratioWidth = width in setAspectRatio()
55 val width = View.MeasureSpec.getSize(widthMeasureSpec) in onMeasure() constant
58 setMeasuredDimension(width, height) in onMeasure()
60 if (width < ((height * ratioWidth) / ratioHeight)) { in onMeasure()
61 setMeasuredDimension(width, (width * ratioHeight) / ratioWidth) in onMeasure()
DCamera2VideoFragment.kt88 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable()
89 openCamera(width, height) in onSurfaceTextureAvailable()
92 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged()
93 configureTransform(width, height) in onSurfaceTextureSizeChanged()
172 configureTransform(textureView.width, textureView.height) in onSurfaceTextureDestroyed()
219 openCamera(textureView.width, textureView.height) in onResume()
322 private fun openCamera(width: Int, height: Int) { in openCamera()
345 width, height, videoSize) in openCamera()
348 textureView.setAspectRatio(previewSize.width, previewSize.height) in openCamera()
350 textureView.setAspectRatio(previewSize.height, previewSize.width) in openCamera()
[all …]
DCompareSizesByArea.kt29 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
/developers/samples/android/media/Camera2Basic/kotlinApp/Application/src/main/java/com/example/android/camera2basic/
DAutoFitTextureView.kt44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio()
45 if (width < 0 || height < 0) { in setAspectRatio()
48 ratioWidth = width in setAspectRatio()
55 val width = View.MeasureSpec.getSize(widthMeasureSpec) in onMeasure() constant
58 setMeasuredDimension(width, height) in onMeasure()
60 if (width < height * ratioWidth / ratioHeight) { in onMeasure()
61 setMeasuredDimension(width, width * ratioHeight / ratioWidth) in onMeasure()
DCamera2BasicFragment.kt69 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable()
70 openCamera(width, height) in onSurfaceTextureAvailable()
73 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged()
74 configureTransform(width, height) in onSurfaceTextureSizeChanged()
277 openCamera(textureView.width, textureView.height) in onResume()
316 private fun setUpCameraOutputs(width: Int, height: Int) { in setUpCameraOutputs()
336 imageReader = ImageReader.newInstance(largest.width, largest.height, in setUpCameraOutputs()
350 val rotatedPreviewWidth = if (swappedDimensions) height else width in setUpCameraOutputs()
351 val rotatedPreviewHeight = if (swappedDimensions) width else height in setUpCameraOutputs()
368 textureView.setAspectRatio(previewSize.width, previewSize.height) in setUpCameraOutputs()
[all …]
DCompareSizesByArea.kt15 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
/developers/samples/android/media/Camera2Video/Application/src/main/java/com/example/android/camera2video/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/build/prebuilts/gradle/Camera2Basic/kotlinApp/Application/src/main/java/com/example/android/camera2basic/
DAutoFitTextureView.kt44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio()
45 if (width < 0 || height < 0) { in setAspectRatio()
48 ratioWidth = width in setAspectRatio()
55 val width = View.MeasureSpec.getSize(widthMeasureSpec) in onMeasure() constant
58 setMeasuredDimension(width, height) in onMeasure()
60 if (width < height * ratioWidth / ratioHeight) { in onMeasure()
61 setMeasuredDimension(width, width * ratioHeight / ratioWidth) in onMeasure()
DCamera2BasicFragment.kt69 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable()
70 openCamera(width, height) in onSurfaceTextureAvailable()
73 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged()
74 configureTransform(width, height) in onSurfaceTextureSizeChanged()
277 openCamera(textureView.width, textureView.height) in onResume()
316 private fun setUpCameraOutputs(width: Int, height: Int) { in setUpCameraOutputs()
336 imageReader = ImageReader.newInstance(largest.width, largest.height, in setUpCameraOutputs()
350 val rotatedPreviewWidth = if (swappedDimensions) height else width in setUpCameraOutputs()
351 val rotatedPreviewHeight = if (swappedDimensions) width else height in setUpCameraOutputs()
368 textureView.setAspectRatio(previewSize.width, previewSize.height) in setUpCameraOutputs()
[all …]
/developers/build/prebuilts/gradle/Camera2Video/Application/src/main/java/com/example/android/camera2video/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/build/prebuilts/gradle/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/build/prebuilts/gradle/Camera2Video/kotlinApp/Application/src/main/java/com/example/android/camera2video/
DAutoFitTextureView.kt44 fun setAspectRatio(width: Int, height: Int) { in setAspectRatio()
45 if (width < 0 || height < 0) { in setAspectRatio()
48 ratioWidth = width in setAspectRatio()
55 val width = View.MeasureSpec.getSize(widthMeasureSpec) in onMeasure() constant
58 setMeasuredDimension(width, height) in onMeasure()
60 if (width < ((height * ratioWidth) / ratioHeight)) { in onMeasure()
61 setMeasuredDimension(width, (width * ratioHeight) / ratioWidth) in onMeasure()
DCamera2VideoFragment.kt88 override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureAvailable()
89 openCamera(width, height) in onSurfaceTextureAvailable()
92 override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { in onSurfaceTextureSizeChanged()
93 configureTransform(width, height) in onSurfaceTextureSizeChanged()
172 configureTransform(textureView.width, textureView.height) in onSurfaceTextureDestroyed()
219 openCamera(textureView.width, textureView.height) in onResume()
322 private fun openCamera(width: Int, height: Int) { in openCamera()
345 width, height, videoSize) in openCamera()
348 textureView.setAspectRatio(previewSize.width, previewSize.height) in openCamera()
350 textureView.setAspectRatio(previewSize.height, previewSize.width) in openCamera()
[all …]
DCompareSizesByArea.kt29 signum(lhs.width.toLong() * lhs.height - rhs.width.toLong() * rhs.height)
/developers/samples/android/media/Camera2Basic/Application/src/main/java/com/example/android/camera2basic/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/developers/samples/android/media/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/
DOverlayDisplayWindow.java62 int width, int height, int gravity) { in OverlayDisplayWindow() argument
65 mWidth = width; in OverlayDisplayWindow()
71 int width, int height, int gravity) { in create() argument
73 return new JellybeanMr1Impl(context, name, width, height, gravity); in create()
75 return new LegacyImpl(context, name, width, height, gravity); in create()
91 public abstract void updateAspectRatio(int width, int height); in updateAspectRatio() argument
110 int width, int height, int gravity) { in LegacyImpl() argument
111 super(context, name, width, height, gravity); in LegacyImpl()
135 int width = (int)(display.getWidth() * INITIAL_SCALE); in show() local
138 height = mHeight * width / mWidth; in show()
[all …]
DLocalPlayer.java352 int width = mMediaPlayer.getVideoWidth(); in updateVideoRect() local
354 if (width > 0 && height > 0) { in updateVideoRect()
355 mVideoWidth = width; in updateVideoRect()
453 int width, int height) { in surfaceChanged() argument
455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged()
479 int width = getVideoWidth(); in updateSize() local
481 if (width > 0 && height > 0) { in updateSize()
489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize()
492 lp.width = surfaceWidth; in updateSize()
493 lp.height = surfaceWidth * height / width; in updateSize()
[all …]
/developers/build/prebuilts/gradle/MediaRouter/Application/src/main/java/com/example/android/mediarouter/player/
DOverlayDisplayWindow.java62 int width, int height, int gravity) { in OverlayDisplayWindow() argument
65 mWidth = width; in OverlayDisplayWindow()
71 int width, int height, int gravity) { in create() argument
73 return new JellybeanMr1Impl(context, name, width, height, gravity); in create()
75 return new LegacyImpl(context, name, width, height, gravity); in create()
91 public abstract void updateAspectRatio(int width, int height); in updateAspectRatio() argument
110 int width, int height, int gravity) { in LegacyImpl() argument
111 super(context, name, width, height, gravity); in LegacyImpl()
135 int width = (int)(display.getWidth() * INITIAL_SCALE); in show() local
138 height = mHeight * width / mWidth; in show()
[all …]
DLocalPlayer.java352 int width = mMediaPlayer.getVideoWidth(); in updateVideoRect() local
354 if (width > 0 && height > 0) { in updateVideoRect()
355 mVideoWidth = width; in updateVideoRect()
453 int width, int height) { in surfaceChanged() argument
455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged()
479 int width = getVideoWidth(); in updateSize() local
481 if (width > 0 && height > 0) { in updateSize()
489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize()
492 lp.width = surfaceWidth; in updateSize()
493 lp.height = surfaceWidth * height / width; in updateSize()
[all …]
/developers/samples/android/media/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/
DFixedAspectSurfaceView.java87 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
112 float boxAspectRatio = width / (float) height; in onMeasure()
135 width = (int) (height * mAspectRatio); in onMeasure()
137 height = (int) (width / mAspectRatio); in onMeasure()
141 width = View.resolveSizeAndState(width, widthMeasureSpec, 0); in onMeasure()
145 setMeasuredDimension(width, height); in onMeasure()
/developers/build/prebuilts/gradle/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/
DFixedAspectSurfaceView.java87 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
112 float boxAspectRatio = width / (float) height; in onMeasure()
135 width = (int) (height * mAspectRatio); in onMeasure()
137 height = (int) (width / mAspectRatio); in onMeasure()
141 width = View.resolveSizeAndState(width, widthMeasureSpec, 0); in onMeasure()
145 setMeasuredDimension(width, height); in onMeasure()
/developers/samples/android/ui/fonts/DownloadableFonts/kotlinApp/app/src/main/kotlin/com/example/android/downloadablefonts/
DQueryBuilder.kt23 val width: Float? = null, constant in com.example.android.downloadablefonts.QueryBuilder
29 if (weight == null && width == null && italic == null && besteffort == null) { in build()
35 width?.let { builder.append("&width=").append(width) } in build()
/developers/build/prebuilts/gradle/DownloadableFonts/kotlinApp/app/src/main/kotlin/com/example/android/downloadablefonts/
DQueryBuilder.kt23 val width: Float? = null, constant in com.example.android.downloadablefonts.QueryBuilder
29 if (weight == null && width == null && italic == null && besteffort == null) { in build()
35 width?.let { builder.append("&width=").append(width) } in build()

1234