Home
last modified time | relevance | path

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

12345678910>>...35

/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/support/v17/leanback/tests/java/android/support/v17/leanback/widget/
DShadowOverlayContainerTest.java58 assertTrue(textView.getWidth() > 0); in testWrapContent()
59 assertTrue(textView.getWidth() < 500); in testWrapContent()
62 assertEquals(container.getWidth(), textView.getWidth()); in testWrapContent()
70 assertTrue(textView.getWidth() == 123); in testWrapContent()
72 assertEquals(container.getWidth(), textView.getWidth()); in testWrapContent()
89 assertTrue(textView.getWidth() == 200);
92 assertEquals(container.getWidth(), textView.getWidth());
100 assertTrue(textView.getWidth() == 123);
102 assertEquals(container.getWidth(), textView.getWidth());
120 assertTrue(textView.getWidth() == 500);
[all …]
/frameworks/base/tools/layoutlib/bridge/src/android/view/
DShadowPainter.java80 int width = source.getWidth(); in createDropShadow()
88 int dstWidth = image.getWidth(); in createDropShadow()
189 int width = source.getWidth(); in createRectangularDropShadow()
216 int width = source.getWidth(); in createSmallRectangularDropShadow()
297 assert ShadowBottomRight.getWidth(null) == SHADOW_SIZE; in drawRectangleShadow()
300 int blWidth = ShadowBottomLeft.getWidth(null); in drawRectangleShadow()
309 gc.drawImage(ShadowBottomLeft, x - ShadowBottomLeft.getWidth(null), y + height, null); in drawRectangleShadow()
312 gc.drawImage(ShadowTopLeft, x - ShadowTopLeft.getWidth(null), y, null); in drawRectangleShadow()
315 0, 0, ShadowBottom.getWidth(null), ShadowBottom.getHeight(null), null); in drawRectangleShadow()
317 … x + width, y + ShadowTopRight.getHeight(null), x + width + ShadowRight.getWidth(null), y + height, in drawRectangleShadow()
[all …]
/frameworks/support/percent/tests/java/android/support/percent/
DPercentDynamicLayoutTest.java113 final int containerWidth = percentFrameLayout.getWidth();
125 0.5f * availableWidth, child1.getWidth());
129 0.5f * availableWidth, child2.getWidth());
143 final int containerWidth = percentFrameLayout.getWidth();
155 availableWidth, child1.getWidth());
159 availableWidth, child2.getWidth());
173 final int containerWidth = percentRelativeLayout.getWidth();
185 0.5f * availableWidth, child1.getWidth());
189 0.5f * availableWidth, child2.getWidth());
203 final int containerWidth = percentRelativeLayout.getWidth();
[all …]
DPercentRelativeTest.java71 mContainerWidth = mPercentRelativeLayout.getWidth(); in setUp()
79 final int childWidth = childToTest.getWidth(); in testTopChild()
100 final int childWidth = childToTest.getWidth(); in testLeftChild()
121 final int childWidth = childToTest.getWidth(); in testBottomChild()
142 final int childWidth = childToTest.getWidth(); in testRightChild()
/frameworks/support/v7/gridlayout/tests/src/android/support/v7/widget/
DGridLayoutTest.java71 int left = mLeftView.getWidth(); in testUseDefaultMargin()
72 int right = mRightView.getWidth(); in testUseDefaultMargin()
73 int total = mGridView.getWidth(); in testUseDefaultMargin()
84 int left = mLeftView.getWidth(); in testImplicitFillHorizontal()
85 int right = mRightView.getWidth(); in testImplicitFillHorizontal()
86 int total = mGridView.getWidth(); in testImplicitFillHorizontal()
97 int left = mLeftView.getWidth(); in testMakeViewGone()
98 int right = mRightView.getWidth(); in testMakeViewGone()
99 int total = mGridView.getWidth(); in testMakeViewGone()
115 left = mActivityTestRule.getActivity().findViewById(R.id.leftView).getWidth(); in testMakeViewGone()
/frameworks/support/design/src/android/support/design/widget/
DSwipeDismissBehavior.java252 final int childWidth = child.getWidth();
292 final int thresholdDistance = Math.round(child.getWidth() * mDragDismissThreshold);
301 return child.getWidth();
312 min = mOriginalCapturedViewLeft - child.getWidth();
316 max = mOriginalCapturedViewLeft + child.getWidth();
321 max = mOriginalCapturedViewLeft + child.getWidth();
323 min = mOriginalCapturedViewLeft - child.getWidth();
327 min = mOriginalCapturedViewLeft - child.getWidth();
328 max = mOriginalCapturedViewLeft + child.getWidth();
342 + child.getWidth() * mAlphaStartSwipeDistance;
[all …]
/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/base/services/tests/servicestests/src/com/android/server/wm/
DTaskSnapshotSurfaceTest.java78 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillHorizontally()
88 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_fillVertically()
98 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillBoth()
109 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_sameSize()
119 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_bitmapLarger()
173 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground()
186 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground_nullFrame()
199 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground_nope()
213 when(mockCanvas.getWidth()).thenReturn(100); in testDrawNavigationBarBackground()
226 when(mockCanvas.getWidth()).thenReturn(100); in testDrawNavigationBarBackground_left()
[all …]
/frameworks/base/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/
DImageUtils.java63 int maxDimension = Math.max(image.getWidth(), image.getHeight()); in requireSimilar()
92 BufferedImage temp = new BufferedImage(goldenImage.getWidth(), goldenImage.getHeight(), in assertImageSimilar()
99 int imageWidth = Math.min(goldenImage.getWidth(), image.getWidth()); in assertImageSimilar()
158 } else if (Math.abs(goldenImage.getWidth() - image.getWidth()) >= 2) { in assertImageSimilar()
160 goldenImage.getWidth() + "x" + goldenImage.getHeight() + in assertImageSimilar()
161 "vs" + image.getWidth() + "x" + image.getHeight(); in assertImageSimilar()
164 goldenImage.getWidth() + "x" + goldenImage.getHeight() + in assertImageSimilar()
165 "vs" + image.getWidth() + "x" + image.getHeight(); in assertImageSimilar()
208 int sourceWidth = source.getWidth(); in scale()
/frameworks/base/core/tests/coretests/src/android/widget/layout/table/
DWeightTest.java61 assertEquals(mCell1.getWidth() + mCell2.getWidth() + mCell3.getWidth(), mRow.getWidth()); in testAllCellsFillParent()
/frameworks/base/core/java/com/android/internal/widget/
DFloatingToolbar.java622 mPopupWindow.getWidth(), mPopupWindow.getHeight()); in updateCoordinates()
631 contentRectOnScreen.centerX() - mPopupWindow.getWidth() / 2, in refreshCoordinatesAndOverflowDirection()
632 mViewPortOnScreen.right - mPopupWindow.getWidth()); in refreshCoordinatesAndOverflowDirection()
761 final int targetWidth = mOverflowPanelSize.getWidth(); in openOverflow()
763 final int startWidth = mContentContainer.getWidth(); in openOverflow()
767 final float right = left + mContentContainer.getWidth(); in openOverflow()
780 mContentContainer.setX(right - mContentContainer.getWidth()); in openOverflow()
784 mMainPanel.setX(mContentContainer.getWidth() - startWidth); in openOverflow()
785 mOverflowPanel.setX(mContentContainer.getWidth() - targetWidth); in openOverflow()
803 overflowButtonStartX + targetWidth - mOverflowButton.getWidth() : in openOverflow()
[all …]
/frameworks/support/design/tests/src/android/support/design/widget/
DAppBarWithAnchoredFabMarginsTest.java54 assertEquals(appbarOnScreenXY[0] + mAppBar.getWidth() / 2, in testFabBottomMargin()
55 fabOnScreenXY[0] + fab.getWidth() / 2, 1); in testFabBottomMargin()
81 assertEquals(appbarOnScreenXY[0] + mAppBar.getWidth() / 2, in testFabTopMargin()
82 fabOnScreenXY[0] + fab.getWidth() / 2, 1); in testFabTopMargin()
135 assertEquals(appbarOnScreenXY[0] + mAppBar.getWidth() - mFabMargin, in testFabRightMargin()
136 fabOnScreenXY[0] + fab.getWidth(), 1); in testFabRightMargin()
DAppBarWithToolbarTest.java50 final int centerX = appbarOnScreenXY[0] + mAppBar.getWidth() / 2; in testScrollToolbarWithFitSystemWindowsParent()
100 assertEquals(mAppBar.getWidth(), scrollingContent.getWidth()); in testScrollingContentPositionWithFitSystemWindowsParent()
127 assertEquals(mAppBar.getWidth(), scrollingContent.getWidth()); in testScrollingContentPositionWithFitSystemWindowsParentInRtl()
150 Rect rect = new Rect(0, 0, child.getWidth(), child.getHeight()); in testRequestRectangleWithChildThatDoesNotRequireScroll()
183 Rect rect = new Rect(0, 0, child.getWidth(), child.getHeight()); in testRequestRectangleWithChildThatDoesRequireScroll()
/frameworks/base/media/java/android/media/
DImageUtils.java110 Size srcSize = new Size(src.getWidth(), src.getHeight()); in imageCopy()
111 Size dstSize = new Size(dst.getWidth(), dst.getHeight()); in imageCopy()
149 int srcByteCount = effectivePlaneSize.getWidth() * srcPlanes[i].getPixelStride(); in imageCopy()
235 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
237 return new Size(image.getWidth() / 2, image.getHeight() / 2); in getEffectivePlaneSizeForImage()
241 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
243 return new Size(image.getWidth(), image.getHeight() / 2); in getEffectivePlaneSizeForImage()
256 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
DImage.java164 public abstract int getWidth(); in getWidth() method in Image
224 return new Rect(0, 0, getWidth(), getHeight()); in getCropRect()
241 if (!cropRect.intersect(0, 0, getWidth(), getHeight())) { in setCropRect()
/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()
/frameworks/base/core/java/android/app/
DVr2dDisplayProperties.java47 int result = getWidth(); in hashCode()
69 if (getWidth() != that.getWidth()) return false; in equals()
112 public int getWidth() { in getWidth() method in Vr2dDisplayProperties
/frameworks/base/core/tests/coretests/src/android/view/
DZeroSizedTest.java63 assertTrue(mWithDimension.getWidth() > 0); in testDrawingCacheWithDimension()
70 assertTrue(mWithNoWdith.getWidth() == 0); in testDrawingCacheWithNoWidth()
77 assertTrue(mWithNoHeight.getWidth() > 0); in testDrawingCacheWithNoHeight()
84 assertTrue(mWithNoDimension.getWidth() == 0); in testDrawingCacheWithNoDimension()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/
DCamera2RecordingTest.java396 (videoSz.getWidth() > maxPreviewSize.getWidth() || in basicRecordingTestByCamera()
553 (videoSz.getWidth() > maxPreviewSize.getWidth() || in videoSnapshotTestByCamera()
581 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera()
589 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera()
606 videoSz.getWidth() <= maxPreviewSize.getWidth() && in videoSnapshotTestByCamera()
626 if (videoSnapshotSz.getWidth() * videoSnapshotSz.getHeight() > FRAME_SIZE_15M) in videoSnapshotTestByCamera()
773 if (videoSize.getWidth() > maxPreviewSize.getWidth() || in updatePreviewSurfaceWithVideo()
784 s.getWidth() <= videoSize.getWidth() && in updatePreviewSurfaceWithVideo()
839 mMediaRecorder.setVideoSize(sz.getWidth(), sz.getHeight()); in prepareRecording()
986 CameraTestUtils.validateImage(image, size.getWidth(), size.getHeight(),
[all …]
/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/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/base/core/java/android/widget/
DHorizontalScrollView.java198 final int rightEdge = getWidth() - mPaddingRight; in getRightFadingEdgeStrength()
272 int childWidth = child.getWidth(); in canScroll()
273 return getWidth() < childWidth + mPaddingLeft + mPaddingRight ; in canScroll()
643 mEdgeGlowLeft.onPull((float) deltaX / getWidth(), in onTouchEvent()
649 mEdgeGlowRight.onPull((float) deltaX / getWidth(), in onTouchEvent()
805 final int viewportWidth = getWidth() - mPaddingLeft - mPaddingRight; in performAccessibilityActionInternal()
817 final int viewportWidth = getWidth() - mPaddingLeft - mPaddingRight; in performAccessibilityActionInternal()
867 child.getWidth() - (getWidth() - mPaddingLeft - mPaddingRight)); in getScrollRange()
897 final int rightWithoutFadingEdge = left + getWidth() - fadingEdgeLength; in findFocusableViewInMyBounds()
1005 int width = getWidth(); in pageScroll()
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/drawable/
DIconTest.java153 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testWithBitmapResource()
180 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testWithFile()
213 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testAsync()
240 originalbits.getWidth() * originalbits.getHeight() * 2); // guess 50% compression in testParcel()
286 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testParcel()
325 final int w = a.getWidth(); in printBits()
335 if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight()) return false; in equalBitmaps()
337 final int w = a.getWidth(); in equalBitmaps()
359 if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight()) { in findBitmapDifferences()
361 a.getWidth(), a.getHeight(), b.getWidth(), b.getHeight()); in findBitmapDifferences()
[all …]

12345678910>>...35