/packages/services/Car/tests/InstrumentClusterRendererSample/src/com/android/car/cluster/sample/ |
D | BitmapUtils.java | 54 if (bm == null || (bm.getHeight() == height && bm.getWidth() == width)) { in scaleBitmap() 59 float widthScale = (float) width / bm.getWidth(); in scaleBitmap() 62 int scaleWidth = (int) Math.ceil(bm.getWidth() * scale); in scaleBitmap() 85 if (bitmap.getWidth() == bitmap.getHeight()) { in squareCropBitmap() 89 int size = Math.min(bitmap.getWidth(), bitmap.getHeight()); in squareCropBitmap() 95 int x = size < bitmap.getWidth() ? (bitmap.getWidth() - size ) / 2 : 0; in squareCropBitmap() 98 Rect dstRect = new Rect(0, 0, output.getWidth(), output.getHeight()); in squareCropBitmap() 106 Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), 111 Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); 116 canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, [all …]
|
/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() 229 reflectRotation, master.getOriginalBounds(), getWidth(), getHeight()); in getImageToScreenMatrix() 233 m.postScale(scaleFactor, scaleFactor, getWidth() / 2.0f, getHeight() / 2.0f); in getImageToScreenMatrix() 260 getWidth() - 2*mShadowMargin, in onDraw() 298 float dx = (getHeight() - getWidth()) / 2f; in onDraw() 299 if (getWidth() > getHeight()) { in onDraw() 300 dx = - (getWidth() - getHeight()) / 2f; in onDraw() 303 canvas.rotate(180, getWidth()/2, getHeight()/2); in onDraw() 305 canvas.rotate(90, getWidth()/2, getHeight()/2); in onDraw() 308 canvas.rotate(270, getWidth()/2, getHeight()/2); in onDraw() [all …]
|
D | ImageCrop.java | 233 int width = image.getWidth(); in forceStateConsistency() 265 mImageBounds.set(0, 0, bitmap.getWidth(), bitmap.getHeight()); in onDraw() 270 bitmap.getWidth(), bitmap.getHeight(), canvas.getWidth(), canvas.getHeight()); in onDraw() 274 bitmap.getWidth(), bitmap.getHeight(), canvas.getWidth(), canvas.getHeight()); in onDraw() 291 int delta = Math.min(canvas.getWidth(), canvas.getHeight()) / 4; in onDraw() 312 FilterCropRepresentation.findScaledCrop(mScreenCropBounds, bitmap.getWidth(), in onDraw()
|
/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/UnifiedEmail/src/com/android/mail/browse/ |
D | ConversationItemViewCoordinates.java | 100 public int getWidth() { in getWidth() method in ConversationItemViewCoordinates.Config 288 final int widthSpec = MeasureSpec.makeMeasureSpec(config.getWidth(), MeasureSpec.EXACTLY); in ConversationItemViewCoordinates() 295 folderLayoutWidth = (int) (view.getWidth() * in ConversationItemViewCoordinates() 297 folderCellWidth = (int) (view.getWidth() * in ConversationItemViewCoordinates() 306 contactImagesWidth = contactImagesView.getWidth(); in ConversationItemViewCoordinates() 320 starWidth = star.getWidth(); in ConversationItemViewCoordinates() 326 sendersWidth = senders.getWidth(); in ConversationItemViewCoordinates() 335 subjectWidth = subject.getWidth(); in ConversationItemViewCoordinates() 343 maxSnippetWidth = snippet.getWidth(); in ConversationItemViewCoordinates() 349 foldersRight = foldersLeft + folders.getWidth(); in ConversationItemViewCoordinates() [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/services/Car/car-ui-provider/src/android/car/ui/provider/ |
D | CarDrawerLayout.java | 726 int contentRight = contentLp.getMarginStart() + getWidth(); in onLayout() 732 int onScreen = (int) (drawerView.getWidth() * drawerLp.onScreen); in onLayout() 735 offset = onScreen - drawerView.getWidth(); in onLayout() 870 final int offScreen = (int) ((1 - drawerLp.onScreen) * findDrawerView().getWidth()); in drawChild() 871 final int drawerRight = getWidth() - drawerLp.getMarginEnd() - offScreen; in drawChild() 881 final int onScreen = (int) (findDrawerView().getWidth() * drawerLp.onScreen); in drawChild() 882 final int drawerLeft = drawerLp.getMarginStart() + getWidth() - onScreen; in drawChild() 1049 left = drawerLp.getMarginStart() + getWidth() - drawerView.getWidth(); in openDrawer() 1085 left = drawerLp.getMarginStart() - drawerView.getWidth(); in closeDrawer() 1087 left = drawerLp.getMarginStart() + getWidth(); in closeDrawer() [all …]
|
/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/Launcher3/src/com/android/launcher3/dragndrop/ |
D | DragView.java | 95 final float scale = (bitmap.getWidth() + finalScaleDps) / bitmap.getWidth(); in DragView() 130 mBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight()); in DragView() 131 setDragRegion(new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight())); in DragView() 192 setMeasuredDimension(mBitmap.getWidth(), mBitmap.getHeight()); in onMeasure() 206 size.set((int)(mBitmap.getWidth() * getScaleX()), (int)(mBitmap.getHeight() * getScaleY())); in provideDragShadowMetrics() 208 final float xGrowth = mBitmap.getWidth() * (getScaleX() - 1); in provideDragShadowMetrics() 227 float sX = (mBitmap.getWidth() * 1.0f) / mCrossFadeBitmap.getWidth(); in onDraw() 319 lp.width = mBitmap.getWidth(); in show()
|
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/ |
D | BitmapUtils.java | 37 if (bm == null || (bm.getHeight() == height && bm.getWidth() == width)) { in scaleBitmap() 46 if (bm.getWidth() > width) { in scaleBitmap() 47 widthScale = (float) width / bm.getWidth(); in scaleBitmap() 50 int scaleWidth = (int) Math.ceil(bm.getWidth() * scale); in scaleBitmap() 84 if (bm.getHeight() < height || bm.getWidth() < width) { in cropBitmap() 88 bm.getWidth(), bm.getHeight(), width, height)); in cropBitmap() 92 int x = (bm.getWidth() - width) / 2; in cropBitmap()
|
/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/Launcher3/src/com/android/launcher3/widget/ |
D | PendingItemDragHelper.java | 111 scale = previewBounds.width() / (float) preview.getWidth(); in startDrag() 121 scale = ((float) launcher.getDeviceProfile().iconSizePx) / preview.getWidth(); in startDrag() 148 + (int) ((scale * preview.getWidth() - preview.getWidth()) / 2); in startDrag() 162 int width = mPreviewBitmap.getWidth(); in createDragOutline() 171 Rect src = new Rect(0, 0, mPreviewBitmap.getWidth(), mPreviewBitmap.getHeight()); in createDragOutline() 191 Rect src = new Rect(0, 0, mPreviewBitmap.getWidth(), mPreviewBitmap.getHeight()); in createDragOutline() 192 float scaleFactor = Math.min((w - blurSizeOutline) / (float) mPreviewBitmap.getWidth(), in createDragOutline() 194 int scaledWidth = (int) (scaleFactor * mPreviewBitmap.getWidth()); in createDragOutline()
|
/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/apps/Camera2/src/com/android/camera/one/v2/camera2proxy/ |
D | ForwardingImageProxy.java | 91 public int getWidth() { in getWidth() method in ForwardingImageProxy 92 return mImpl.getWidth(); in getWidth() 107 .add("width", getWidth()) in toString() 122 otherImage.getWidth() == getWidth() && in equals() 129 return Objects.hashCode(getFormat(), getWidth(), getHeight(), getTimestamp()); in hashCode()
|
D | AndroidImageProxy.java | 106 mWidth = mImage.getWidth(); in AndroidImageProxy() 190 public int getWidth() { in getWidth() method in AndroidImageProxy 209 .add("width", getWidth()) in toString() 224 otherImage.getWidth() == getWidth() && in equals() 231 return Objects.hashCode(getFormat(), getWidth(), getHeight(), getTimestamp()); in hashCode()
|
/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/Dialer/java/com/android/incallui/answer/impl/ |
D | SelfManagedAnswerVideoCallScreen.java | 127 float outputAspect = (float) previewSize.getWidth() / previewSize.getHeight(); in openCamera() 129 surfaceView.getHolder().setFixedSize(previewSize.getWidth(), previewSize.getHeight()); in openCamera() 191 (float) bestCandidateSize.getWidth() / bestCandidateSize.getHeight(); in getOptimalSize() 194 if (candidateSize.getWidth() < MAX_WIDTH) { in getOptimalSize() 195 float candidateAspect = (float) candidateSize.getWidth() / candidateSize.getHeight(); in getOptimalSize() 202 || candidateSize.getWidth() > bestCandidateSize.getWidth()) { in getOptimalSize()
|
/packages/apps/TV/src/com/android/tv/util/ |
D | BitmapUtils.java | 61 final double bmRatio = bm.getHeight() / (double) bm.getWidth(); in calculateNewSize() 65 rect.bottom = Math.round((float) bm.getHeight() * maxWidth / bm.getWidth()); in calculateNewSize() 67 rect.right = Math.round((float) bm.getWidth() * maxHeight / bm.getHeight()); in calculateNewSize() 76 calculateInSampleSize(bm.getWidth(), bm.getHeight(), maxWidth, maxHeight)); in createScaledBitmapInfo() 238 boolean reload = (size.right >= bitmap.getWidth() * 2 in needToReload() 251 return needToReload(other.bitmap.getWidth(), other.bitmap.getHeight()); in needToReload() 256 return "ScaledBitmapInfo[" + id + "](in=" + inSampleSize + ", w=" + bitmap.getWidth() in toString()
|
/packages/services/Telephony/src/com/android/phone/ |
D | EmergencyActionGroup.java | 244 int centerX = v.getLeft() + v.getWidth() / 2; in revealTheButton() 251 Math.max(centerX, mSelectedContainer.getWidth() - centerX) in revealTheButton() 270 (v.getLeft() + v.getWidth() / 2 - mSelectedContainer.getWidth() / 2) / 5); in animateHintText() 289 int centerX = v.getLeft() + v.getWidth() / 2; in hideTheButton() 295 Math.max(centerX, mSelectedContainer.getWidth() - centerX) in hideTheButton() 320 ripple.getLeft() + ripple.getWidth() / 2, in startRipple() 323 ripple.getWidth() / 2); in startRipple()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/ |
D | CropActivity.java | 206 if (bitmap != null && bitmap.getWidth() != 0 && bitmap.getHeight() != 0) { in doneLoadBitmap() 207 RectF imgBounds = new RectF(0, 0, bitmap.getWidth(), bitmap.getHeight()); in doneLoadBitmap() 309 RectF photo = new RectF(0, 0, mOriginalBitmap.getWidth(), mOriginalBitmap.getHeight()); in startFinishOutput() 325 || currentBitmap.getWidth() == 0 || currentBitmap.getHeight() == 0 in startBitmapIO() 452 Bitmap tmp = Bitmap.createBitmap(ret, 0, 0, ret.getWidth(), in doInBackground() 518 RectF cropRect = new RectF(0, 0, crop.getWidth(), crop.getHeight()); in doInBackground() 536 Bitmap tmp = Bitmap.createBitmap(crop, 0, 0, crop.getWidth(), in doInBackground() 618 RectF imageBounds = new RectF(0, 0, image.getWidth(), image.getHeight()); in getCroppedImage() 630 if (image == null || image.getWidth() == 0 || image.getHeight() == 0 || max_size < 16) { in getDownsampledBitmap() 639 Bitmap ret = Bitmap.createScaledBitmap(image, image.getWidth() >> shifts, in getDownsampledBitmap() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/ |
D | CachingPipeline.java | 179 Log.v(LOGTAG,"setOriginal, size " + bitmap.getWidth() + " x " + bitmap.getHeight()); in setOriginal() 325 … Log.v(LOGTAG, "after update, req bitmap (" + bitmap.getWidth() + "x" + bitmap.getHeight() in render() 326 + " ? resizeOriginal (" + mResizedOriginalBitmap.getWidth() + "x" in render() 352 if (iconBounds.width() > source.getWidth() * 2) { in render() 360 float minSize = Math.min(source.getWidth(), source.getHeight()); in render() 364 float dx = (iconBounds.width() - (source.getWidth() * scale))/2.0f; in render() 448 bitmap.getWidth() != mWidth || bitmap.getHeight() != mHeight) { in prepareRenderscriptAllocations() 463 if (bitmap.getWidth() != mWidth in prepareRenderscriptAllocations() 465 mWidth = bitmap.getWidth(); in prepareRenderscriptAllocations()
|
/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/common/ |
D | InputStreamProvider.java | 142 scaleDownSampleSize = bounds.x / fullSize.getWidth(); in readCroppedBitmap() 150 if (roundedTrueCrop.width() > fullSize.getWidth()) { in readCroppedBitmap() 152 roundedTrueCrop.right = roundedTrueCrop.left + fullSize.getWidth(); in readCroppedBitmap() 154 if (roundedTrueCrop.right > fullSize.getWidth()) { in readCroppedBitmap() 156 roundedTrueCrop.offset(-(roundedTrueCrop.right - fullSize.getWidth()), 0); in readCroppedBitmap() 177 float[] dimsAfter = new float[] { crop.getWidth(), crop.getHeight() }; in readCroppedBitmap() 195 m1.setTranslate(-crop.getWidth() / 2f, -crop.getHeight() / 2f); in readCroppedBitmap()
|
/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()
|