Home
last modified time | relevance | path

Searched refs:getWidth (Results 1 – 25 of 717) sorted by relevance

12345678910>>...29

/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/src/androidx/media/filterfw/samples/simplecamera/
DFaceSquareFilterTest.java80 bitmap.getPixels(pixels, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), in testFaceSquareFilter()
89 int left = (faceRect.left+WIDTH_OFFSET)*bitmap.getWidth()/FACE_X_RANGE; in testFaceSquareFilter()
90 int right = (faceRect.right+WIDTH_OFFSET)*bitmap.getWidth()/FACE_X_RANGE; in testFaceSquareFilter()
99 } else if (left > bitmap.getWidth()) { in testFaceSquareFilter()
100 left = bitmap.getWidth(); in testFaceSquareFilter()
107 if (right > bitmap.getWidth()) { in testFaceSquareFilter()
108 right = bitmap.getWidth(); in testFaceSquareFilter()
116 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) + in testFaceSquareFilter()
118 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) + in testFaceSquareFilter()
120 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) + in testFaceSquareFilter()
[all …]
/frameworks/layoutlib/bridge/src/android/view/
DShadowPainter.java82 int width = source.getWidth(); in createDropShadow()
90 int dstWidth = image.getWidth(); in createDropShadow()
191 int width = source.getWidth(); in createRectangularDropShadow()
218 int width = source.getWidth(); in createSmallRectangularDropShadow()
299 assert ShadowBottomRight.getWidth(null) == SHADOW_SIZE; in drawRectangleShadow()
302 int blWidth = ShadowBottomLeft.getWidth(null); in drawRectangleShadow()
311 gc.drawImage(ShadowBottomLeft, x - ShadowBottomLeft.getWidth(null), y + height, null); in drawRectangleShadow()
314 gc.drawImage(ShadowTopLeft, x - ShadowTopLeft.getWidth(null), y, null); in drawRectangleShadow()
317 0, 0, ShadowBottom.getWidth(null), ShadowBottom.getHeight(null), null); in drawRectangleShadow()
319 … x + width, y + ShadowTopRight.getHeight(null), x + width + ShadowRight.getWidth(null), y + height, in drawRectangleShadow()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/utils/
DWmDisplayCutout.java69 mFrameSize.getWidth() - insetLeft - insetRight, in inset()
87 final int insetRight = mFrameSize.getWidth() - frame.right; in calculateRelativeTo()
115 if (displaySize.getWidth() < displaySize.getHeight()) { in computeSafeInsets()
122 } else if (displaySize.getWidth() > displaySize.getHeight()) { in computeSafeInsets()
124 new Rect(displaySize.getWidth() / 2, 0, displaySize.getWidth() / 2, 0)) in computeSafeInsets()
157 if (boundingRect.right == display.getWidth()) { in findInsetForSide()
158 inset = Math.max(inset, display.getWidth() - boundingRect.left); in findInsetForSide()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DFrameImage2D.java137 if (bitmap.getWidth() != dimensions[0] || bitmap.getHeight() != dimensions[1]) { in validateBitmapSize()
138 throw new IllegalArgumentException("Cannot assign bitmap of size " + bitmap.getWidth() in validateBitmapSize()
160 Rect srcIRect = new Rect((int) srcRect.left * srcImage.getWidth(), in cpuImageCopy()
162 (int) srcRect.right * srcImage.getWidth(), in cpuImageCopy()
164 Rect dstIRect = new Rect((int) dstRect.left * srcImage.getWidth(), in cpuImageCopy()
166 (int) dstRect.right * srcImage.getWidth(), in cpuImageCopy()
171 Bitmap dstBitmap = Bitmap.createBitmap(dstImage.getWidth(), dstImage.getHeight(), config); in cpuImageCopy()
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/
DImageUtils.java63 int maxDimension = Math.max(image.getWidth(), image.getHeight()); in requireSimilar()
90 BufferedImage temp = new BufferedImage(goldenImage.getWidth(), goldenImage.getHeight(), in assertImageSimilar()
97 int imageWidth = Math.min(goldenImage.getWidth(), image.getWidth()); in assertImageSimilar()
156 } else if (Math.abs(goldenImage.getWidth() - image.getWidth()) >= 2) { in assertImageSimilar()
158 goldenImage.getWidth() + "x" + goldenImage.getHeight() + in assertImageSimilar()
159 "vs" + image.getWidth() + "x" + image.getHeight(); in assertImageSimilar()
162 goldenImage.getWidth() + "x" + goldenImage.getHeight() + in assertImageSimilar()
163 "vs" + image.getWidth() + "x" + image.getHeight(); in assertImageSimilar()
205 int sourceWidth = source.getWidth(); in scale()
/frameworks/base/core/java/com/android/internal/widget/
DFloatingToolbar.java667 mPopupWindow.getWidth(), mPopupWindow.getHeight()); in updateCoordinates()
676 contentRectOnScreen.centerX() - mPopupWindow.getWidth() / 2, in refreshCoordinatesAndOverflowDirection()
677 mViewPortOnScreen.right - mPopupWindow.getWidth()); in refreshCoordinatesAndOverflowDirection()
806 final int targetWidth = mOverflowPanelSize.getWidth(); in openOverflow()
808 final int startWidth = mContentContainer.getWidth(); in openOverflow()
812 final float right = left + mContentContainer.getWidth(); in openOverflow()
825 mContentContainer.setX(right - mContentContainer.getWidth()); in openOverflow()
829 mMainPanel.setX(mContentContainer.getWidth() - startWidth); in openOverflow()
830 mOverflowPanel.setX(mContentContainer.getWidth() - targetWidth); in openOverflow()
848 overflowButtonStartX + targetWidth - mOverflowButton.getWidth() : in openOverflow()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/layout/table/
DWeightTest.java61 assertEquals(mCell1.getWidth() + mCell2.getWidth() + mCell3.getWidth(), mRow.getWidth()); in testAllCellsFillParent()
DFixedWidthTest.java59 assertEquals(150, mFixedWidth.getWidth()); in testFixedWidth()
60 assertEquals(mFixedWidth.getWidth(), mNonFixedWidth.getWidth()); in testFixedWidth()
/frameworks/base/media/java/android/media/
DImageUtils.java117 Size srcSize = new Size(src.getWidth(), src.getHeight()); in imageCopy()
118 Size dstSize = new Size(dst.getWidth(), dst.getHeight()); in imageCopy()
156 int srcByteCount = effectivePlaneSize.getWidth() * srcPlanes[i].getPixelStride(); in imageCopy()
245 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
247 return new Size(image.getWidth() / 2, image.getHeight() / 2); in getEffectivePlaneSizeForImage()
251 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
253 return new Size(image.getWidth(), image.getHeight() / 2); in getEffectivePlaneSizeForImage()
268 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
DThumbnailUtils.java111 final int widthSample = info.getSize().getWidth() / size.getWidth(); in onHeaderDecoded()
275 new MediaMetadataRetriever.BitmapParams(), size.getWidth(), in createImageThumbnail()
276 size.getWidth() * size.getHeight()); in createImageThumbnail()
304 final int width = bitmap.getWidth(); in createImageThumbnail()
366 if (size.getWidth() > width && size.getHeight() > height) { in createVideoThumbnail()
372 size.getWidth(), size.getHeight())); in createVideoThumbnail()
406 if (source.getWidth() < source.getHeight()) { in extractThumbnail()
407 scale = width / (float) source.getWidth(); in extractThumbnail()
462 int deltaX = source.getWidth() - targetWidth; in transform()
480 deltaXHalf + Math.min(targetWidth, source.getWidth()), in transform()
[all …]
DImage.java174 public abstract int getWidth(); in getWidth() method in Image
266 return new Rect(0, 0, getWidth(), getHeight()); in getCropRect()
283 if (!cropRect.intersect(0, 0, getWidth(), getHeight())) { in setCropRect()
/frameworks/base/core/java/android/app/
DWallpaperColors.java134 Bitmap bitmap = Bitmap.createBitmap(optimalSize.getWidth(), optimalSize.getHeight(), in fromDrawable()
137 drawable.setBounds(0, 0, bitmap.getWidth(), bitmap.getHeight()); in fromDrawable()
159 final int bitmapArea = bitmap.getWidth() * bitmap.getHeight(); in fromBitmap()
163 Size optimalSize = calculateOptimalSize(bitmap.getWidth(), bitmap.getHeight()); in fromBitmap()
164 bitmap = Bitmap.createScaledBitmap(bitmap, optimalSize.getWidth(), in fromBitmap()
178 final float minColorArea = bitmap.getWidth() * bitmap.getHeight() * MIN_COLOR_OCCURRENCE; in fromBitmap()
379 int[] pixels = new int[source.getWidth() * source.getHeight()]; in calculateDarkHints()
383 source.getPixels(pixels, 0 /* offset */, source.getWidth(), 0 /* x */, 0 /* y */, in calculateDarkHints()
384 source.getWidth(), source.getHeight()); in calculateDarkHints()
417 source.setPixels(pixels, 0, source.getWidth(), 0, 0, source.getWidth(), in calculateDarkHints()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskSnapshotSurfaceTest.java94 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillHorizontally()
104 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_fillVertically()
114 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillBoth()
125 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_sameSize()
135 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_bitmapLarger()
189 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground()
202 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground_nullFrame()
215 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground_nope()
229 when(mockCanvas.getWidth()).thenReturn(100); in testDrawNavigationBarBackground()
242 when(mockCanvas.getWidth()).thenReturn(100); in testDrawNavigationBarBackground_left()
[all …]
/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/
DCameraOps.java143 int leftArea = lhs.getHeight() * lhs.getWidth(); in resume()
144 int rightArea = lhs.getHeight() * lhs.getWidth(); in resume()
152 Log.v(TAG,"max big "+max.getWidth()+" x "+max.getHeight()); in resume()
160 Log.v(TAG,"BIG wil be "+big.getWidth()+" x "+big.getHeight()); in resume()
161 mImageReader = ImageReader.newInstance(big.getWidth(), big.getHeight(), in resume()
233 Log.v(TAG, "S>> size=" + mImage.getWidth() + in run()
237 Log.v(TAG, "S>> bytes out " + bytes.length / mImage.getWidth()); in run()
323 if (candidateSize.getWidth() <= MAX_WIDTH) { in getBestSize()
332 double aspectDelta = Math.abs(maxSize.getWidth() / maxSize.getHeight() - TARGET_ASPECT); in getBestSize()
334 if (maxSize.getWidth() < candidateSize.getWidth()) { in getBestSize()
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DTransform3dActivity.java57 final float centerX = getWidth() / 2.0f - mBitmap1.getWidth() / 2.0f; in onDraw()
67 drawBitmap(canvas, centerX, centerY, -mBitmap1.getWidth(), matrix); in onDraw()
70 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth(), matrix); in onDraw()
73 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth() * 2.0f, matrix); in onDraw()
DBitmapMutateActivity.java74 mPixels = new int[mBitmap1.getWidth() * mBitmap1.getHeight()]; in BitmapsView()
75 mSlice = mBitmap1.getWidth() / 3; in BitmapsView()
87 int width = mBitmap1.getWidth(); in onDraw()
90 canvas.translate((getWidth() - width) / 2, 0); in onDraw()
DAlpha8BitmapActivity.java50 mBitmap1 = Bitmap.createBitmap(texture.getWidth(), texture.getHeight(), in BitmapsView()
59 final float width = texture.getWidth() / 3.0f; in BitmapsView()
86 Rect src = new Rect(0, 0, mBitmap1.getWidth() / 2, mBitmap1.getHeight() / 2); in onDraw()
87 Rect dst = new Rect(0, mBitmap1.getHeight() * 3, mBitmap1.getWidth(), in onDraw()
/frameworks/base/core/tests/coretests/src/android/graphics/drawable/
DIconTest.java119 assertThat(bm.getWidth()).isEqualTo(4321); in testScaleDownIfNecessary()
122 assertThat(ic.getBitmap().getWidth()).isLessThan(41); in testScaleDownIfNecessary()
169 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testWithBitmapResource()
196 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testWithFile()
229 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testAsync()
256 originalbits.getWidth() * originalbits.getHeight() * 2); // guess 50% compression in testParcel()
302 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testParcel()
341 final int w = a.getWidth(); in printBits()
351 if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight()) return false; in equalBitmaps()
353 final int w = a.getWidth(); in equalBitmaps()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DZeroSizedTest.java62 assertTrue(mWithDimension.getWidth() > 0); in testDrawingCacheWithDimension()
69 assertTrue(mWithNoWdith.getWidth() == 0); in testDrawingCacheWithNoWidth()
76 assertTrue(mWithNoHeight.getWidth() > 0); in testDrawingCacheWithNoHeight()
83 assertTrue(mWithNoDimension.getWidth() == 0); in testDrawingCacheWithNoDimension()
/frameworks/base/core/tests/coretests/src/android/content/
DContentResolverTest.java91 final int after = (100 * bitmap.getWidth()) / bitmap.getHeight(); in assertImageAspectAndContents()
95 final int halfX = bitmap.getWidth() / 2; in assertImageAspectAndContents()
112 assertEquals(1280, res.getWidth()); in testLoadThumbnail_Normal()
127 assertTrue(res.getWidth() <= 640); in testLoadThumbnail_Scaling()
142 assertTrue(res.getWidth() <= 640); in testLoadThumbnail_Aspect()
157 assertEquals(32, res.getWidth()); in testLoadThumbnail_Tiny()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/
DCamera2RecordingTest.java400 (videoSz.getWidth() > maxPreviewSize.getWidth() || in basicRecordingTestByCamera()
557 (videoSz.getWidth() > maxPreviewSize.getWidth() || in videoSnapshotTestByCamera()
585 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera()
593 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera()
610 videoSz.getWidth() <= maxPreviewSize.getWidth() && in videoSnapshotTestByCamera()
630 if (videoSnapshotSz.getWidth() * videoSnapshotSz.getHeight() > FRAME_SIZE_15M) in videoSnapshotTestByCamera()
781 if (videoSize.getWidth() > maxPreviewSize.getWidth() || in updatePreviewSurfaceWithVideo()
792 s.getWidth() <= videoSize.getWidth() && in updatePreviewSurfaceWithVideo()
847 mMediaRecorder.setVideoSize(sz.getWidth(), sz.getHeight()); in prepareRecording()
996 CameraTestUtils.validateImage(image, size.getWidth(), size.getHeight(),
[all …]
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/
DVrView.java198 double dist_x = (mDownPointX - x) * mDownScreenWidth / getWidth(); in panMove()
199 double dist_y = (y - mDownPointY) * mDownScreenWidth / getWidth(); in panMove()
259 deltax = (float) ((mDownPointX - e.getX()) / getWidth()); in actionMove()
260 deltay = (float) -((mDownPointY - e.getY()) / getWidth()); in actionMove()
264 deltax = (float) ((mDownPointX - e.getX()) / getWidth()); in actionMove()
265 deltay = (float) -((mDownPointY - e.getY()) / getWidth()); in actionMove()
269 deltax = (float) ((mDownPointX - e.getX()) / getWidth()); in actionMove()
270 deltay = (float) -((mDownPointY - e.getY()) / getWidth()); in actionMove()
298 mState1.mTransform.look(looks[last_look], mState1.mCubeScreen, getWidth(), getHeight()); in resetCut()
311 mState1.mTransform.look(ViewMatrix.DOWN_AT, mState1.mCubeScreen, getWidth(), getHeight()); in setVolume()
[all …]
/frameworks/layoutlib/bridge/src/android/view/shadow/
DSpotShadowBitmapGenerator.java43 mTriangle.setSize(config.getWidth(), config.getHeight(), 0); in SpotShadowBitmapGenerator()
80 if ((shadowBounds[2] - shadowBounds[0]) > mShadowConfig.getWidth() || in populateShadow()
92 } else if (shadowBounds[2] > mShadowConfig.getWidth()) { in populateShadow()
94 mTranslateX = shadowBounds[2] - mShadowConfig.getWidth(); in populateShadow()
/frameworks/base/core/java/android/view/
DViewOutlineProvider.java40 outline.setRect(0, 0, view.getWidth(), view.getHeight());
55 outline.setRect(0, 0, view.getWidth(), view.getHeight());
70 view.getWidth() - view.getPaddingRight(),
/frameworks/base/core/java/android/widget/
DHorizontalScrollView.java226 final int rightEdge = getWidth() - mPaddingRight; in getRightFadingEdgeStrength()
368 int childWidth = child.getWidth(); in canScroll()
369 return getWidth() < childWidth + mPaddingLeft + mPaddingRight ; in canScroll()
741 mEdgeGlowLeft.onPull((float) deltaX / getWidth(), in onTouchEvent()
747 mEdgeGlowRight.onPull((float) deltaX / getWidth(), in onTouchEvent()
903 final int viewportWidth = getWidth() - mPaddingLeft - mPaddingRight; in performAccessibilityActionInternal()
915 final int viewportWidth = getWidth() - mPaddingLeft - mPaddingRight; in performAccessibilityActionInternal()
965 child.getWidth() - (getWidth() - mPaddingLeft - mPaddingRight)); in getScrollRange()
995 final int rightWithoutFadingEdge = left + getWidth() - fadingEdgeLength; in findFocusableViewInMyBounds()
1103 int width = getWidth(); in pageScroll()
[all …]

12345678910>>...29