/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/ |
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()
|
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/ |
D | BitmapUtils.java | 51 if (bm == null || (bm.getHeight() == height && bm.getWidth() == width)) { in scaleBitmap() 60 if (bm.getWidth() > width) { in scaleBitmap() 61 widthScale = (float) width / bm.getWidth(); in scaleBitmap() 64 int scaleWidth = (int) Math.ceil(bm.getWidth() * scale); in scaleBitmap() 98 if (bm.getHeight() < height || bm.getWidth() < width) { in cropBitmap() 102 bm.getWidth(), bm.getHeight(), width, height)); in cropBitmap() 106 int x = (bm.getWidth() - width) / 2; in cropBitmap() 115 Bitmap clone = Bitmap.createBitmap(image.getWidth(), image.getHeight(), ARGB_8888); in createTintedBitmap() 149 drawable.setBounds(0, 0, bitmapSize.getWidth(), bitmapSize.getHeight()); in fromDrawable() 157 RectF dstR = new RectF(0f, 0f, bitmapSize.getWidth(), bitmapSize.getHeight()); in fromDrawable() [all …]
|
D | ImageUtils.java | 68 if (image.getWidth() > bitmapTargetSize.getWidth() in maybeResize() 72 int width = Math.round(scale * image.getWidth()); in maybeResize() 81 return (size.getWidth() + size.getHeight()) / 2; in getAverage() 85 return (image.getWidth() + image.getHeight()) / 2; in getBitmapDimension()
|
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
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 …]
|
D | TimeBar.java | 124 mScrubberLeft = mPlayedBar.right - mScrubber.getWidth() / 2; in update() 154 int scrubberRight = mScrubberLeft + mScrubber.getWidth(); in inScrubber() 161 int half = mScrubber.getWidth() / 2; in clampScrubber() 168 return (int) ((long) (mScrubberLeft + mScrubber.getWidth() / 2 - mProgressBar.left) in getScrubberTime() 179 int margin = mScrubber.getWidth() / 3; in onLayout() 210 getWidth() - getPaddingRight() - mTimeBounds.width() / 2, in onDraw() 226 : mScrubber.getWidth() / 2; in onTouchEvent()
|
/packages/apps/TV/tuner/tests/unittests/javatests/com/android/tv/tuner/layout/tests/ |
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()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/ |
D | ImageShow.java | 126 Bitmap a = Bitmap.createBitmap(b.getWidth(), b.getHeight(), Bitmap.Config.ALPHA_8); in convertToAlphaMask() 230 primary.getOriginalBounds(), getWidth(), getHeight()); in getImageToScreenMatrix() 234 m.postScale(scaleFactor, scaleFactor, getWidth() / 2.0f, getHeight() / 2.0f); in getImageToScreenMatrix() 261 getWidth() - 2*mShadowMargin, in onDraw() 299 float dx = (getHeight() - getWidth()) / 2f; in onDraw() 300 if (getWidth() > getHeight()) { in onDraw() 301 dx = - (getWidth() - getHeight()) / 2f; in onDraw() 304 canvas.rotate(180, getWidth()/2, getHeight()/2); in onDraw() 306 canvas.rotate(90, getWidth()/2, getHeight()/2); in onDraw() 309 canvas.rotate(270, getWidth()/2, getHeight()/2); in onDraw() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/ |
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()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/qrcode/ |
D | QrCameraTest.java | 119 final int[] intArray = new int[bmp.getWidth() * bmp.getHeight()]; in testDecode_PictureCaptured_QrCodeCorrectValue() 120 bmp.getPixels(intArray, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight()); in testDecode_PictureCaptured_QrCodeCorrectValue() 121 LuminanceSource source = new RGBLuminanceSource(bmp.getWidth(), bmp.getHeight(), in testDecode_PictureCaptured_QrCodeCorrectValue() 138 final int[] intArray = new int[bmp.getWidth() * bmp.getHeight()]; in testDecode_unicodePictureCaptured_QrCodeCorrectValue() 139 bmp.getPixels(intArray, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight()); in testDecode_unicodePictureCaptured_QrCodeCorrectValue() 140 LuminanceSource source = new RGBLuminanceSource(bmp.getWidth(), bmp.getHeight(), in testDecode_unicodePictureCaptured_QrCodeCorrectValue()
|
/packages/apps/Gallery/src/com/android/camera/ |
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()
|
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()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
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()
|
/packages/services/BuiltInPrintService/src/com/android/bips/ |
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()
|
/packages/apps/Camera2/src/com/android/camera/one/v2/camera2proxy/ |
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()
|
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()
|
/packages/apps/DevCamera/src/com/android/devcamera/ |
D | Api2Camera.java | 202 mCameraInfoCache.getYuvStream1Size().getWidth(), in InitializeAllTheThings() 210 mCameraInfoCache.getYuvStream1Size().getWidth(), in InitializeAllTheThings() 218 mCameraInfoCache.getDepthCloudSize().getWidth(), in InitializeAllTheThings() 227 mCameraInfoCache.getYuvStream2Size().getWidth(), in InitializeAllTheThings() 261 mCameraInfoCache.getRawStreamSize().getWidth(), in InitializeAllTheThings() 408 Log.v(TAG, " .. added SurfaceView " + mCameraInfoCache.getPreviewSize().getWidth() + in startCaptureSession() 412 Log.v(TAG, " .. added YUV ImageReader " + mCameraInfoCache.getYuvStream1Size().getWidth() + in startCaptureSession() 422 … Log.v(TAG, " .. added YUV ImageReader " + mCameraInfoCache.getYuvStream2Size().getWidth() + in startCaptureSession() 433 … Log.v(TAG, " .. added Raw ImageReader " + mCameraInfoCache.getRawStreamSize().getWidth() + in startCaptureSession() 439 … Log.v(TAG, " .. added JPEG ImageReader " + mCameraInfoCache.getJpegStreamSize().getWidth() + in startCaptureSession() [all …]
|
/packages/apps/WallpaperPicker/src/com/android/photos/ |
D | BitmapRegionTileSource.java | 45 int getWidth(); in getWidth() method 69 public int getWidth() { in getWidth() method in SimpleBitmapRegionDecoderWrapper 70 return mDecoder.getWidth(); in getWidth() 94 public int getWidth() { in getWidth() method in DumbBitmapRegionDecoder 95 return mBuffer.getWidth(); in getWidth() 150 int width = mDecoder.getWidth(); in loadInBackground() 307 mWidth = mDecoder.getWidth(); in BitmapRegionTileSource() 316 preview.getWidth() <= GL_SIZE_LIMIT && preview.getHeight() <= GL_SIZE_LIMIT) { in BitmapRegionTileSource() 323 preview == null ? -1 : preview.getWidth(), in BitmapRegionTileSource()
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/ |
D | PendingItemDragHelper.java | 108 scale = previewBounds.width() / (float) preview.getWidth(); in startDrag() 119 scale = ((float) launcher.getDeviceProfile().iconSizePx) / preview.getWidth(); in startDrag() 146 + (int) ((scale * preview.getWidth() - preview.getWidth()) / 2); in startDrag() 164 Rect src = new Rect(0, 0, preview.getWidth(), preview.getHeight()); in convertPreviewToAlphaBitmap() 166 float scaleFactor = Math.min((w - blurSizeOutline) / (float) preview.getWidth(), in convertPreviewToAlphaBitmap() 168 int scaledWidth = (int) (scaleFactor * preview.getWidth()); in convertPreviewToAlphaBitmap()
|
/packages/apps/TV/src/com/android/tv/util/images/ |
D | BitmapUtils.java | 74 final double bmRatio = bm.getHeight() / (double) bm.getWidth(); in calculateNewSize() 78 rect.bottom = Math.round((float) bm.getHeight() * maxWidth / bm.getWidth()); in calculateNewSize() 80 rect.right = Math.round((float) bm.getWidth() * maxHeight / bm.getHeight()); in calculateNewSize() 91 calculateInSampleSize(bm.getWidth(), bm.getHeight(), maxWidth, maxHeight)); in createScaledBitmapInfo() 102 drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); in drawableToBitmap() 259 (size.right >= bitmap.getWidth() * 2 || size.bottom >= bitmap.getHeight() * 2); in needToReload() 279 return needToReload(other.bitmap.getWidth(), other.bitmap.getHeight()); in needToReload() 289 + bitmap.getWidth() in toString()
|
/packages/apps/Launcher3/src/com/android/launcher3/notification/ |
D | NotificationMainView.java | 185 ? displacement : OverScroll.dampedScroll(displacement, getWidth())); in onDrag() 201 endTranslation = velocity < 0 ? - getWidth() : getWidth(); in onDragEnd() 202 } else if (Math.abs(startTranslation) > getWidth() / 2) { in onDragEnd() 204 endTranslation = (startTranslation < 0 ? -getWidth() : getWidth()); in onDragEnd() 211 (endTranslation - startTranslation) / getWidth()); in onDragEnd()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/ |
D | SelfManagedAnswerVideoCallScreen.java | 130 float outputAspect = (float) previewSize.getWidth() / previewSize.getHeight(); in openCamera() 132 surfaceView.getHolder().setFixedSize(previewSize.getWidth(), previewSize.getHeight()); in openCamera() 194 (float) bestCandidateSize.getWidth() / bestCandidateSize.getHeight(); in getOptimalSize() 197 if (candidateSize.getWidth() < MAX_WIDTH) { in getOptimalSize() 198 float candidateAspect = (float) candidateSize.getWidth() / candidateSize.getHeight(); in getOptimalSize() 205 || candidateSize.getWidth() > bestCandidateSize.getWidth()) { in getOptimalSize()
|
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/ |
D | Asset.java | 60 int width = view.getWidth() > 0 ? view.getWidth() : Math.abs(view.getLayoutParams().width); in getViewDimensions() 146 int width = imageView.getWidth() > 0 in loadDrawable() 147 ? imageView.getWidth() in loadDrawable() 300 int bitmapWidth = mBitmap.getWidth(); in doInBackground() 311 int horizontalGutterPx = Math.max(0, (scaledBitmap.getWidth() - measuredWidth) / 2); in doInBackground() 318 scaledBitmap.getWidth() - (2 * horizontalGutterPx), in doInBackground()
|
/packages/apps/Settings/src/com/android/settings/wifi/qrcode/ |
D | QrCamera.java | 177 mParameters.setPreviewSize(mPreviewSize.getWidth(), mPreviewSize.getHeight()); in setCameraParameter() 179 mParameters.setPreviewSize(pictureSize.getWidth(), pictureSize.getHeight()); in setCameraParameter() 325 final int viewRatio = (int)getRatio(viewSize.getWidth(), viewSize.getHeight()); in setTransformationMatrix() 330 final int previewWidth = isPortrait ? mPreviewSize.getWidth() : mPreviewSize.getHeight(); in setTransformationMatrix() 331 final int previewHeight = isPortrait ? mPreviewSize.getHeight() : mPreviewSize.getWidth(); in setTransformationMatrix() 352 mPreviewSize.getWidth(), mPreviewSize.getHeight()); in getFrameImage() 377 final double winRatio = getRatio(windowSize.getWidth(), windowSize.getHeight()); in getBestPreviewSize() 382 if (size.height * size.width > bestChoice.getWidth() * bestChoice.getHeight() in getBestPreviewSize() 425 int areaDifference = Math.abs(size.getWidth() * size.getHeight() - previewArea); in getBestPictureSize()
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
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()
|
/packages/services/Telephony/src/com/android/phone/ |
D | EmergencyActionGroup.java | 186 int centerX = v.getLeft() + v.getWidth() / 2; in revealTheButton() 193 Math.max(centerX, mSelectedContainer.getWidth() - centerX) in revealTheButton() 248 (v.getLeft() + v.getWidth() / 2 - mSelectedContainer.getWidth() / 2) / 5); in animateHintText() 267 int centerX = v.getLeft() + v.getWidth() / 2; in hideTheButton() 273 Math.max(centerX, mSelectedContainer.getWidth() - centerX) in hideTheButton() 298 ripple.getLeft() + ripple.getWidth() / 2, in startRipple() 301 ripple.getWidth() / 2); in startRipple()
|