Home
last modified time | relevance | path

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

12345

/cts/tests/tests/hardware/src/android/hardware/camera2/cts/rs/
DBitmapUtils.java68 if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight()) { in calcDifferenceMetric()
70 a.getWidth() + "x" + a.getHeight() + ", b=" + b.getWidth() + "x" + in calcDifferenceMetric()
74 int[] aPixels = new int[a.getHeight() * a.getWidth()]; in calcDifferenceMetric()
76 a.getPixels(aPixels, /*offset*/0, /*stride*/a.getWidth(), /*x*/0, /*y*/0, a.getWidth(), in calcDifferenceMetric()
78 b.getPixels(bPixels, /*offset*/0, /*stride*/b.getWidth(), /*x*/0, /*y*/0, b.getWidth(), in calcDifferenceMetric()
/cts/tests/tests/widget/src/android/widget/cts/
DTableLayoutTest.java229 int oldWidth0 = column0.getWidth(); in testColumnStretchableEffect()
230 int oldWidth1 = column1.getWidth(); in testColumnStretchableEffect()
231 int oldWidth2 = column2.getWidth(); in testColumnStretchableEffect()
238 int totalSpace = tableLayout.getWidth() - orignalWidth0 in testColumnStretchableEffect()
248 assertEquals(oldWidth0, column0.getWidth()); in testColumnStretchableEffect()
249 assertTrue(oldWidth1 < column1.getWidth()); in testColumnStretchableEffect()
250 assertTrue(oldWidth2 > column2.getWidth()); in testColumnStretchableEffect()
252 assertEquals(orignalWidth0, column0.getWidth()); in testColumnStretchableEffect()
253 assertEquals(orignalWidth1 + extraSpace, column1.getWidth()); in testColumnStretchableEffect()
254 assertEquals(orignalWidth2 + extraSpace, column2.getWidth()); in testColumnStretchableEffect()
[all …]
DListPopupWindowTest.java131 assertEquals(WindowManager.LayoutParams.WRAP_CONTENT, mPopupWindow.getWidth()); in testAccessWidth()
133 int width = getDisplay().getWidth() / 2; in testAccessWidth()
135 assertEquals(width, mPopupWindow.getWidth()); in testAccessWidth()
137 width = getDisplay().getWidth(); in testAccessWidth()
139 assertEquals(width, mPopupWindow.getWidth()); in testAccessWidth()
142 assertEquals(0, mPopupWindow.getWidth()); in testAccessWidth()
144 width = getDisplay().getWidth() * 2; in testAccessWidth()
146 assertEquals(width, mPopupWindow.getWidth()); in testAccessWidth()
148 width = - getDisplay().getWidth() / 2; in testAccessWidth()
150 assertEquals(width, mPopupWindow.getWidth()); in testAccessWidth()
DPopupWindowTest.java81 assertEquals(0, mPopupWindow.getWidth()); in testConstructor()
85 assertEquals(50, mPopupWindow.getWidth()); in testConstructor()
89 assertEquals(-1, mPopupWindow.getWidth()); in testConstructor()
97 assertEquals(0, mPopupWindow.getWidth()); in testConstructor()
102 assertEquals(50, mPopupWindow.getWidth()); in testConstructor()
107 assertEquals(-1, mPopupWindow.getWidth()); in testConstructor()
112 assertEquals(0, mPopupWindow.getWidth()); in testConstructor()
118 assertEquals(50, mPopupWindow.getWidth()); in testConstructor()
124 assertEquals(-1, mPopupWindow.getWidth()); in testConstructor()
224 assertEquals(WindowManager.LayoutParams.WRAP_CONTENT, mPopupWindow.getWidth()); in testAccessWidth()
[all …]
DLinearLayoutTest.java168 int parentWidth = parent.getWidth(); in testAccessWeightSum()
169 assertEquals(Math.ceil(parentWidth * 0.2), weight02.getWidth(), 1.0); in testAccessWeightSum()
170 assertEquals(Math.ceil(parentWidth * 0.5), weight05.getWidth(), 1.0); in testAccessWeightSum()
171 assertEquals(Math.ceil(parentWidth * 0.3), weight03.getWidth(), 1.0); in testAccessWeightSum()
270 assertEquals(parent.getWidth(), bottomView.getRight()); in testLayoutHorizontal()
316 assertEquals(leftView.getWidth(), leftView.getRight()); in testLayoutVertical()
318 int offset = (parent.getWidth() - centerView.getWidth()) / 2; in testLayoutVertical()
322 assertEquals(offset + centerView.getWidth(), centerView.getRight()); in testLayoutVertical()
326 assertEquals(parent.getWidth() - rightView.getWidth(), rightView.getLeft()); in testLayoutVertical()
327 assertEquals(parent.getWidth(), rightView.getRight()); in testLayoutVertical()
/cts/tests/tests/graphics/src/android/graphics/cts/
DNinePatchTest.java80 Bitmap bitmap = Bitmap.createBitmap(expected.getWidth(), expected.getHeight(), in testDraw()
83 RectF rectf = new RectF(0, 0, c.getWidth(), c.getHeight()); in testDraw()
88 bitmap = Bitmap.createBitmap(expected.getWidth(), expected.getHeight(), in testDraw()
91 Rect rect = new Rect(0, 0, c.getWidth(), c.getHeight()); in testDraw()
95 bitmap = Bitmap.createBitmap(expected.getWidth(), expected.getHeight(), in testDraw()
98 rect = new Rect(0, 0, c.getWidth(), c.getHeight()); in testDraw()
105 bitmap = Bitmap.createBitmap(expected.getWidth(), expected.getHeight(), in testDraw()
108 rectf = new RectF(0, 0, c.getWidth(), c.getHeight()); in testDraw()
115 assertEquals(expected.getWidth(), bitmap.getWidth()); in checkBitmapWithAlpha()
117 int width = expected.getWidth(); in checkBitmapWithAlpha()
[all …]
DBitmapFactoryTest.java116 assertEquals(START_WIDTH, b.getWidth()); in testDecodeResource1()
126 assertEquals(START_WIDTH * mTargetDensity / mDefaultDensity, b.getWidth(), 1.1); in testDecodeResource2()
137 assertEquals(START_WIDTH, b.getWidth()); in testDecodeResourceStream()
146 assertEquals(START_WIDTH, b.getWidth()); in testDecodeByteArray1()
157 assertEquals(START_WIDTH, b.getWidth()); in testDecodeByteArray2()
167 assertEquals(START_WIDTH, b.getWidth()); in testDecodeStream1()
178 assertEquals(START_WIDTH, b.getWidth()); in testDecodeStream2()
187 assertEquals(WIDTHS[i], b.getWidth()); in testDecodeStream3()
271 assertEquals(START_WIDTH, b.getWidth()); in testDecodeFileDescriptor1()
283 assertEquals(START_WIDTH, b.getWidth()); in testDecodeFileDescriptor2()
[all …]
DBitmapRegionDecoderTest.java114 assertEquals(WIDTHS[i], decoder.getWidth()); in testNewInstanceInputStream()
133 assertEquals(WIDTHS[i], decoder.getWidth()); in testNewInstanceByteArray()
150 assertEquals(WIDTHS[i], decoder1.getWidth()); in testNewInstanceStringAndFileDescriptor()
155 assertEquals(WIDTHS[i], decoder2.getWidth()); in testNewInstanceStringAndFileDescriptor()
205 wholeImage.getWidth(), wholeImage.getHeight(), opts.inPreferredConfig); in testDecodeRegionInputStreamInBitmap()
287 decoder.getWidth(); in testRecycle()
309 int width = decoder.getWidth(); in compareRegionByRegion()
334 Rect expectedRect = new Rect(left, top, left + actual.getWidth(), in compareRegionByRegion()
401 assertEquals("mismatching widths", expected.getWidth(), in compareBitmaps()
402 actual.getWidth()); in compareBitmaps()
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/
DShapeTest.java43 assertEquals(200f, mockShape.getWidth()); in testSize()
48 assertEquals(0f, mockShape.getWidth()); in testSize()
52 assertEquals(Float.MAX_VALUE, mockShape.getWidth()); in testSize()
56 assertEquals(0f, mockShape.getWidth()); in testSize()
82 assertEquals(100f, shape.getWidth()); in testClone()
86 assertEquals(shape.getWidth(), clonedShape.getWidth()); in testClone()
DRoundRectShapeTest.java87 assertEquals(100f, roundRectShape.getWidth()); in testClone()
91 assertEquals(roundRectShape.getWidth(), clonedShape.getWidth()); in testClone()
DPathShapeTest.java94 assertEquals(100f, pathShape.getWidth()); in testClone()
98 assertEquals(pathShape.getWidth(), clonedShape.getWidth()); in testClone()
DRectShapeTest.java70 assertEquals(100f, rectShape.getWidth()); in testClone()
74 assertEquals(rectShape.getWidth(), clonedShape.getWidth()); in testClone()
/cts/tests/tests/media/src/android/media/cts/
DCodecImage.java101 public abstract int getWidth(); in getWidth() method in CodecImage
130 return new Rect(0, 0, getWidth(), getHeight()); in getCropRect()
145 cropRect.intersect(0, 0, getWidth(), getHeight()); in setCropRect()
DInputSurface.java107 mWidth = getWidth(); in eglSetup()
116 mWidth = getWidth(); in updateSize()
193 public int getWidth() { in getWidth() method in InputSurface
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/
DCameraPreviewView.java43 float centerX = canvas.getWidth() / 2.0f; in onDraw()
52 int vertLines = canvas.getWidth() / 2 / GRID_WIDTH; in onDraw()
56 canvas.drawLine(0, y, canvas.getWidth(), y, mPaint); in onDraw()
58 canvas.drawLine(0, y, canvas.getWidth(), y, mPaint); in onDraw()
/cts/tests/tests/animation/src/android/animation/cts/
DShapeHolder.java89 public float getWidth() { in getWidth() method in ShapeHolder
90 return mShape.getShape().getWidth(); in getWidth()
104 s.resize(s.getWidth(), height); in setHeight()
/cts/tests/tests/hardware/src/android/hardware/camera2/cts/
DRecordingTest.java608 (videoSz.getWidth() > maxPreviewSize.getWidth() || in basicRecordingTestByCamera()
798 (videoSz.getWidth() > maxPreviewSize.getWidth() || in videoSnapshotTestByCamera()
826 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera()
834 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera()
851 videoSz.getWidth() <= maxPreviewSize.getWidth() && in videoSnapshotTestByCamera()
871 if (videoSnapshotSz.getWidth() * videoSnapshotSz.getHeight() > FRAME_SIZE_15M) in videoSnapshotTestByCamera()
1018 if (videoSize.getWidth() > maxPreviewSize.getWidth() || in updatePreviewSurfaceWithVideo()
1029 s.getWidth() <= videoSize.getWidth() && in updatePreviewSurfaceWithVideo()
1084 mMediaRecorder.setVideoSize(sz.getWidth(), sz.getHeight()); in prepareRecording()
1227 CameraTestUtils.validateImage(image, size.getWidth(), size.getHeight(),
[all …]
DExtendedCameraCharacteristicsTest.java179 if (activeArraySize.getWidth() >= FULLHD.getWidth() && in testAvailableStreamConfigs()
186 if (activeArraySize.getWidth() >= HD.getWidth() && in testAvailableStreamConfigs()
193 if (activeArraySize.getWidth() >= VGA.getWidth() && in testAvailableStreamConfigs()
200 if (activeArraySize.getWidth() >= QVGA.getWidth() && in testAvailableStreamConfigs()
218 maxVideoSize.getWidth() >= FULLHD.getWidth() && in testAvailableStreamConfigs()
237 if (size.getWidth() >= maxVideoSize.getWidth() && in testAvailableStreamConfigs()
522 (maxJpegSize.getWidth() <= maxYuvSize.getWidth() && in testStaticBurstCharacteristics()
526 (maxYuvSize.getWidth() <= sensorSize.getWidth() * (1.0 + SIZE_ERROR_MARGIN) && in testStaticBurstCharacteristics()
527 maxYuvSize.getWidth() >= sensorSize.getWidth() * (1.0 - SIZE_ERROR_MARGIN) && in testStaticBurstCharacteristics()
552 boolean havefast8MPYuv = (maxFastYuvSize.getWidth() * maxFastYuvSize.getHeight()) > in testStaticBurstCharacteristics()
[all …]
/cts/libs/deviceutil/src/android/cts/util/
DWidgetTestUtils.java51 if (b1.getWidth() != b2.getWidth() || b1.getHeight() != b2.getHeight() in assertEquals()
56 int w = b1.getWidth(); in assertEquals()
/cts/tests/tests/view/src/android/view/cts/
DFocusFinderTest.java95 rect.offset(mTopLeft.getWidth() / 2, 0); in testFindNextFocusFromRect()
96 rect.inset(mTopLeft.getWidth() / 4, mTopLeft.getHeight() / 4); in testFindNextFocusFromRect()
112 rect.inset(mTopLeft.getWidth() / 4, mTopLeft.getHeight() / 4); in testFindNextFocusFromRect()
137 int x = mTopLeft.getWidth() / 2 - 5; in testFindNearestTouchable()
/cts/hostsidetests/theme/src/android/theme/cts/
DComparisonTask.java82 final int w = actual.getWidth(); in compare()
84 if (w != expected.getWidth() || h != expected.getHeight()) { in compare()
110 final int w1 = expected.getWidth(); in createDiff()
112 final int w2 = actual.getWidth(); in createDiff()
/cts/tests/tests/view/src/android/view/animation/cts/
DRotateAnimationTest.java92 rotateAnimation.initialize(animWindow.getWidth(), animWindow.getHeight(), in testRotateAgainstOrigin()
93 animWindowParent.getWidth(), animWindowParent.getHeight()); in testRotateAgainstOrigin()
139 final float actualPivotX = pivotX * animWindowParent.getWidth(); in testRotateAgainstPoint()
148 rotateAnimation.initialize(animWindow.getWidth(), animWindow.getHeight(), in testRotateAgainstPoint()
149 animWindowParent.getWidth(), animWindowParent.getHeight()); in testRotateAgainstPoint()
/cts/tests/tests/graphics/src/android/opengl/cts/
DCompressedTextureSurfaceView.java160 int byteBufferSize = mBaseTexture.getWidth() * in CompressedTextureRender()
201 int w = mBaseTexture.getWidth(); in comparePixel()
226 int w = mBaseTexture.getWidth(); in comparePixels()
227 int h = mBaseTexture.getWidth(); in comparePixels()
248 GLES20.glViewport(0, 0, mBaseTexture.getWidth(), mBaseTexture.getHeight()); in onDrawFrame()
251 GLES20.glReadPixels(0, 0, mBaseTexture.getWidth(), mBaseTexture.getHeight(), in onDrawFrame()
290 mBaseTexture.getWidth(), mBaseTexture.getHeight(), 0, in initFBO()
354 mCompressedTexture.getWidth(), in onSurfaceCreated()
/cts/tests/tests/text/src/android/text/method/cts/
DTouchTest.java80 Touch.scrollTo(tv, layout, width - tv.getWidth() - 1, 0); in testScrollTo()
84 assertEquals(width - tv.getWidth() - 1, tv.getScrollX()); in testScrollTo()
94 assertEquals(width - tv.getWidth(), tv.getScrollX(), 1.0f); in testScrollTo()
103 assertEquals(width - tv.getWidth(), tv.getScrollX(), 1.0f); in testScrollTo()
/cts/hostsidetests/theme/app/src/android/theme/app/
DGenerateBitmapTask.java52 if (mView.getWidth() == 0 || mView.getHeight() == 0) { in onPreExecute()
57 mBitmap = Bitmap.createBitmap(mView.getWidth(), mView.getHeight(), in onPreExecute()

12345