/aosp12/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/src/androidx/media/filterfw/samples/simplecamera/ |
H A D | FaceSquareFilterTest.java | 80 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() 138 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * top + left + k) + in testFaceSquareFilter() 140 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * top + left + k) + in testFaceSquareFilter() 159 outputBitmap.getPixels(outputPixels, 0, outputBitmap.getWidth(), 0, 0, in testFaceSquareFilter() [all …]
|
/aosp12/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/ |
H A D | BitmapTransformer.java | 43 int horizontalOffset = (bitmap.getWidth() - resultBitmap.getWidth()) / 2; in applyFillTransformation() 50 int pixelArraySize = Math.min(resultBitmap.getWidth(), bitmap.getWidth()) in applyFillTransformation() 58 bitmap.getWidth() /* stride */, in applyFillTransformation() 61 Math.min(resultBitmap.getWidth(), bitmap.getWidth()) /* width */, in applyFillTransformation() 68 bitmap.getWidth() /* stride */, in applyFillTransformation() 71 Math.min(resultBitmap.getWidth(), bitmap.getWidth()) /* width */, in applyFillTransformation()
|
/aosp12/frameworks/layoutlib/bridge/src/android/view/ |
H A D | ShadowPainter.java | 82 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() 314 gc.drawImage(ShadowTopLeft, x - ShadowTopLeft.getWidth(null), y, null); in drawRectangleShadow() 323 0, 0, ShadowLeft.getWidth(null), ShadowLeft.getHeight(null), null); in drawRectangleShadow() 342 assert Shadow2BottomRight.getWidth(null) == SMALL_SHADOW_SIZE; in drawSmallRectangleShadow() 345 int blWidth = Shadow2BottomLeft.getWidth(null); in drawSmallRectangleShadow() [all …]
|
/aosp12/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/ |
H A D | BitmapUtils.java | 52 if (bm == null || (bm.getHeight() == height && bm.getWidth() == width)) { in scaleBitmap() 61 if (bm.getWidth() > width) { in scaleBitmap() 62 widthScale = (float) width / bm.getWidth(); in scaleBitmap() 65 int scaleWidth = (int) Math.ceil(bm.getWidth() * scale); in scaleBitmap() 99 if (bm.getHeight() < height || bm.getWidth() < width) { in cropBitmap() 103 bm.getWidth(), bm.getHeight(), width, height)); in cropBitmap() 107 int x = (bm.getWidth() - width) / 2; in cropBitmap() 116 Bitmap clone = Bitmap.createBitmap(image.getWidth(), image.getHeight(), ARGB_8888); in createTintedBitmap() 150 drawable.setBounds(0, 0, bitmapSize.getWidth(), bitmapSize.getHeight()); in fromDrawable() 158 RectF dstR = new RectF(0f, 0f, bitmapSize.getWidth(), bitmapSize.getHeight()); in fromDrawable() [all …]
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ |
H A D | MagnifierView.java | 113 int radius = getWidth() / 2; in onLayout() 143 Rect scrimRect = new Rect(0, 0, getWidth(), getHeight() / 2); in onDraw() 149 canvas.drawLine(0, getHeight() / 2, getWidth(), getHeight() / 2, mHandlePaint); in onDraw() 158 float translateXTarget = touchOnRight ? 0 : getParentWidth() - getWidth(); in onCropDragStarted() 161 setPivotX(getWidth() / 2); in onCropDragStarted() 166 setTranslationX((getParentWidth() - getWidth()) / 2); in onCropDragStarted() 178 float translateXTarget = touchOnRight ? 0 : getParentWidth() - getWidth(); in onCropDragMoved() 183 boolean viewOnLeft = getTranslationX() < (getParentWidth() - getWidth()) / 2; in onCropDragMoved() 196 animate().alpha(0).translationX((getParentWidth() - getWidth()) / 2).scaleX(0.2f) 202 int checkerWidth = (int) Math.ceil(getWidth() / mCheckerboardBoxSize); [all …]
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
H A D | TrimTimeBar.java | 80 return mTrimStartScrubber.getWidth() * 3 / 4; in trimStartScrubberTipOffset() 84 return mTrimEndScrubber.getWidth() / 4; in trimEndScrubberTipOffset() 97 mScrubberLeft = mPlayedBar.right - mScrubber.getWidth() / 2; in updatePlayedBarAndScrubberFromTime() 106 mScrubberLeft = mProgressBar.left - mScrubber.getWidth() / 2; in updatePlayedBarAndScrubberFromTime() 150 int scrubberRight = startX + scrubber.getWidth(); in inScrubber() 173 int margin = mScrubber.getWidth() / 3; in onLayout() 203 getWidth() - getPaddingRight() - mTimeBounds.width() / 2, in onDraw() 219 mCurrentTime = getScrubberTime(mScrubberLeft, mScrubber.getWidth() / 2); in updateTimeFromPos() 264 mScrubber.getWidth() / 2, in onTouchEvent() 267 mScrubber.getWidth() / 2); in onTouchEvent() [all …]
|
/aosp12/packages/apps/TV/tuner/tests/unittests/javatests/com/android/tv/tuner/layout/tests/ |
H A D | ScaledLayoutTest.java | 67 assertEquals((int) (400 * 0.1), view1.getWidth()); in testScaledLayout_layoutInXml() 71 assertEquals((int) (400 * 0.1), view2.getWidth()); in testScaledLayout_layoutInXml() 75 assertEquals((int) (400 * 0.2), view3.getWidth()); in testScaledLayout_layoutInXml() 79 assertEquals((int) (400 * 0.1), view4.getWidth()); in testScaledLayout_layoutInXml() 101 assertEquals(50, view1.getWidth()); in testScaledLayout_layoutThroughCode() 105 assertEquals(50, view2.getWidth()); in testScaledLayout_layoutThroughCode() 109 assertEquals(50, view3.getWidth()); in testScaledLayout_layoutThroughCode() 113 assertEquals(50, view4.getWidth()); in testScaledLayout_layoutThroughCode() 131 assertEquals(100, view1.getWidth()); in testScaledLayout_bounceY() 135 assertEquals(100, view2.getWidth()); in testScaledLayout_bounceY()
|
/aosp12/packages/apps/Camera2/src/com/android/camera/one/v2/camera2proxy/ |
H A D | ForwardingImageProxy.java | 92 public int getWidth() { in getWidth() method in ForwardingImageProxy 93 return mImpl.getWidth(); in getWidth() 108 .add("width", getWidth()) in toString() 123 otherImage.getWidth() == getWidth() && in equals() 130 return Objects.hashCode(getFormat(), getWidth(), getHeight(), getTimestamp()); in hashCode()
|
H A D | AndroidImageProxy.java | 107 mWidth = mImage.getWidth(); in AndroidImageProxy() 191 public int getWidth() { in getWidth() method in AndroidImageProxy 210 .add("width", getWidth()) in toString() 225 otherImage.getWidth() == getWidth() && in equals() 232 return Objects.hashCode(getFormat(), getWidth(), getHeight(), getTimestamp()); in hashCode()
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/ |
H A D | IconView.java | 102 int x = (int) (canvas.getWidth() - textWidth - 2*mMargin); in drawText() 104 x = (int) ((canvas.getWidth() - textWidth) / 2.0f); in drawText() 181 mBitmapBounds = new Rect(mMargin/2, mMargin, getWidth() - mMargin/2, in computeBitmapBounds() 185 mBitmapBounds = new Rect(mMargin/2, mMargin, getWidth()/2, getHeight()); in computeBitmapBounds() 187 mBitmapBounds = new Rect(mMargin/2, mMargin, getWidth() - mMargin/2, getHeight()); in computeBitmapBounds() 206 m.setRectToRect(new RectF(0, 0, mBitmap.getWidth(), mBitmap.getHeight()), in onDraw() 209 float scaleWidth = mBitmapBounds.width() / (float) mBitmap.getWidth(); in onDraw() 212 float dx = (mBitmapBounds.width() - (mBitmap.getWidth() * scale)) / 2f; in onDraw() 234 startGradient = getWidth()/2; in onDraw() 236 canvas.drawRect(new RectF(startGradient, start, getWidth(), end), mPaint); in onDraw()
|
/aosp12/frameworks/base/core/java/com/android/internal/widget/ |
H A D | FloatingToolbar.java | 892 final int targetWidth = mMainPanelSize.getWidth(); in closeOverflow() 996 containerSize.getWidth() - mOverflowButtonSize.getWidth()); in setPanelsStatesAtRestingPosition() 1000 mPopupWindow.getWidth() - in setPanelsStatesAtRestingPosition() 1043 mPopupWindow.getWidth() - in setPanelsStatesAtRestingPosition() 1047 containerSize.getWidth() - mOverflowButtonSize.getWidth()); in setPanelsStatesAtRestingPosition() 1049 containerSize.getWidth() - mOverflowPanelSize.getWidth()); in setPanelsStatesAtRestingPosition() 1150 width = mOverflowPanelSize.getWidth(); in setContentAreaAsTouchableSurface() 1153 width = mMainPanelSize.getWidth(); in setContentAreaAsTouchableSurface() 1415 int w = mMainPanelSize.getWidth() - mOverflowPanelSize.getWidth(); in maybeComputeTransitionDurationScale() 1430 mMainPanelSize.getWidth(), in createMainPanel() [all …]
|
/aosp12/packages/apps/Gallery/src/com/android/camera/ |
H A D | RotateBitmap.java | 60 int cx = mBitmap.getWidth() / 2; in getRotateMatrix() 64 matrix.postTranslate(getWidth() / 2, getHeight() / 2); in getRotateMatrix() 75 return mBitmap.getWidth(); in getHeight() 81 public int getWidth() { in getWidth() method in RotateBitmap 85 return mBitmap.getWidth(); in getWidth()
|
H A D | ImageViewTouchBase.java | 155 final int viewWidth = getWidth(); in setImageRotateBitmapResetBase() 194 mBitmapDisplayed.getBitmap().getWidth(), in center() 216 int viewWidth = getWidth(); in center() 260 float viewWidth = getWidth(); in getProperBaseMatrix() 263 float w = bitmap.getWidth(); in getProperBaseMatrix() 301 float fw = (float) mBitmapDisplayed.getWidth() / (float) mThisWidth; in maxZoom() 341 float cx = getWidth() / 2F; in zoomTo() 348 float cx = getWidth() / 2F; in zoomToPoint() 371 float cx = getWidth() / 2F; in zoomIn() 383 float cx = getWidth() / 2F; in zoomOut()
|
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
H A D | LogoUtilsTest.java | 42 assertEquals(10, newBitmap.getWidth()); in testPartiallyResizedBitmap() 56 assertEquals(2, newBitmap.getWidth()); in testPartiallyResizedElongatedBitmap() 68 assertEquals(4, newBitmap.getWidth()); in testResizeBitmapKeepRatio() 78 assertEquals(16, newBitmap.getWidth()); in testResizeBitmapNoScalingNeeded() 86 assertEquals(10, newBitmap.getWidth()); in testResizeBitmapNoIntegerRatio() 128 assertEquals(b1.getWidth(), b2.getWidth()); in assertBitmapEquals() 130 for (int x = 0; x < b1.getWidth(); x++) { in assertBitmapEquals()
|
/aosp12/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/ |
H A D | SurfaceViewRequestReceiver.java | 67 viewSize = new Size(surfaceControl.getWidth(), surfaceControl.getHeight()); in onReceive() 81 viewSize.getWidth(), in onReceive() 88 final float scale = Math.min(surfaceControl.getWidth() / (float) viewSize.getWidth(), in onReceive() 94 view.setTranslationX((surfaceControl.getWidth() - scale * viewSize.getWidth()) / 2); in onReceive()
|
/aosp12/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/ |
H A D | ImageUtils.java | 63 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()
|
/aosp12/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
H A D | FrameImage2D.java | 137 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()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/qrcode/ |
H A D | QrCameraTest.java | 127 final int[] intArray = new int[bmp.getWidth() * bmp.getHeight()]; in testDecode_PictureCaptured_QrCodeCorrectValue() 128 bmp.getPixels(intArray, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight()); in testDecode_PictureCaptured_QrCodeCorrectValue() 129 LuminanceSource source = new RGBLuminanceSource(bmp.getWidth(), bmp.getHeight(), in testDecode_PictureCaptured_QrCodeCorrectValue() 146 final int[] intArray = new int[bmp.getWidth() * bmp.getHeight()]; in testDecode_unicodePictureCaptured_QrCodeCorrectValue() 147 bmp.getPixels(intArray, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight()); in testDecode_unicodePictureCaptured_QrCodeCorrectValue() 148 LuminanceSource source = new RGBLuminanceSource(bmp.getWidth(), bmp.getHeight(), in testDecode_unicodePictureCaptured_QrCodeCorrectValue()
|
/aosp12/packages/services/BuiltInPrintService/src/com/android/bips/ |
H A D | ImageToPdfTask.java | 78 if (mAttributes.getMediaSize().isPortrait() == mBitmap.getWidth() < mBitmap.getHeight()) { in writeBitmapToDocument() 94 extent.width() / POINTS_PER_INCH * mDpi / mBitmap.getWidth()); in writeBitmapToPage() 98 scale = Math.min(extent.height() / POINTS_PER_INCH * mDpi / mBitmap.getWidth(), in writeBitmapToPage() 119 extent.width() / mBitmap.getWidth()); in drawDirect() 121 scale = Math.min(extent.height() / mBitmap.getWidth(), in drawDirect() 125 float offsetX = (extent.width() - mBitmap.getWidth() * scale) / 2; in drawDirect() 130 matrix.postRotate(90, mBitmap.getWidth() / 2, mBitmap.getHeight() / 2); in drawDirect() 144 float offsetX = ((targetWidth / scale) - mBitmap.getWidth()) / 2; in drawOptimized()
|
/aosp12/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/ |
H A D | CameraOps.java | 143 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 …]
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | ProgressSpinner.java | 41 mWidth = Math.max(mOuter.getWidth(), mInner.getWidth()); in ProgressSpinner() 45 public int getWidth() { in getWidth() method in ProgressSpinner 75 mOuter.draw(canvas, -mOuter.getWidth() / 2, -mOuter.getHeight() / 2); in draw() 77 mInner.draw(canvas, -mInner.getWidth() / 2, -mInner.getHeight() / 2); in draw()
|
/aosp12/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/ |
H A D | PipBoundsAlgorithm.java | 252 final int left = (int) (stackBounds.centerX() - size.getWidth() / 2f); in transformBoundsToAspectRatio() 254 stackBounds.set(left, top, left + size.getWidth(), top + size.getHeight()); in transformBoundsToAspectRatio() 260 final float sizeAspectRatio = size.getWidth() / (float) size.getHeight(); in adjustSizeToAspectRatio() 263 return new Size(size.getWidth(), (int) (size.getWidth() / aspectRatio)); in adjustSizeToAspectRatio() 278 defaultBounds.set(0, 0, size.getWidth(), size.getHeight()); in getDefaultBounds() 303 defaultBounds.set(0, 0, defaultSize.getWidth(), defaultSize.getHeight()); in getDefaultBounds() 440 final int smallestSize = Math.min(size.getWidth(), size.getHeight()); in getSizeForAspectRatio() 465 if (normalBounds.width() >= minMenuSize.getWidth() in adjustNormalBoundsToFitMenu() 471 final boolean needsWidthAdj = minMenuSize.getWidth() > normalBounds.width(); in adjustNormalBoundsToFitMenu() 484 adjWidth = minMenuSize.getWidth(); in adjustNormalBoundsToFitMenu() [all …]
|
/aosp12/frameworks/base/core/tests/coretests/src/android/graphics/drawable/ |
H A D | IconTest.java | 119 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() 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() 375 if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight()) { in findBitmapDifferences() 377 a.getWidth(), a.getHeight(), b.getWidth(), b.getHeight()); in findBitmapDifferences() [all …]
|
/aosp12/frameworks/native/services/surfaceflinger/CompositionEngine/src/planner/ |
H A D | TexturePool.cpp | 63 if (static_cast<int32_t>(texture->getBuffer()->getWidth()) != mSize.getWidth() || in returnTexture() 67 texture->getBuffer()->getWidth(), texture->getBuffer()->getHeight(), mSize.getWidth(), in returnTexture() 86 make(mSize.getWidth(), mSize.getHeight(), in genTexture()
|
/aosp12/frameworks/base/media/java/android/media/ |
H A D | ImageUtils.java | 123 Size srcSize = new Size(src.getWidth(), src.getHeight()); in imageCopy() 124 Size dstSize = new Size(dst.getWidth(), dst.getHeight()); in imageCopy() 162 int srcByteCount = effectivePlaneSize.getWidth() * srcPlanes[i].getPixelStride(); in imageCopy() 254 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage() 256 return new Size(image.getWidth() / 2, image.getHeight() / 2); in getEffectivePlaneSizeForImage() 260 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage() 262 return new Size(image.getWidth(), image.getHeight() / 2); in getEffectivePlaneSizeForImage() 278 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
|