Home
last modified time | relevance | path

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

12345678910>>...27

/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DBitmapTransformer.java43 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()
DWallpaperSurfaceCallback.java125 mWidth = mHost.getView().getWidth(); in surfaceCreated()
197 mHomeImageWallpaper.measure(makeMeasureSpec(mContainerView.getWidth(), EXACTLY), in setupSurfaceWallpaper()
199 mHomeImageWallpaper.layout(0, 0, mContainerView.getWidth(), in setupSurfaceWallpaper()
206 mHost.setView(mHomeImageWallpaper, mHomeImageWallpaper.getWidth(), in setupSurfaceWallpaper()
212 mHomeImageWallpaper.measure(makeMeasureSpec(mContainerView.getWidth(), EXACTLY), in resizeSurfaceWallpaper()
214 mHomeImageWallpaper.layout(0, 0, mContainerView.getWidth(), in resizeSurfaceWallpaper()
216 mHost.relayout(mHomeImageWallpaper.getWidth(), mHomeImageWallpaper.getHeight()); in resizeSurfaceWallpaper()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DTrimTimeBar.java80 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 …]
DTimeBar.java124 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/
DScaledLayoutTest.java67 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/category/
DIconView.java102 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()
DAction.java162 int minSide = Math.min(destination.getWidth(), destination.getHeight()); in drawCenteredImage()
164 float scaleFactor = minSide / (float) Math.min(source.getWidth(), source.getHeight()); in drawCenteredImage()
166 float dx = (destination.getWidth() - source.getWidth() * scaleFactor) / 2.0f; in drawCenteredImage()
195 new Rect(0, 0, mOverlayBitmap.getWidth(), mOverlayBitmap.getHeight()), in available()
196 new Rect(0, 0, mImage.getWidth(), mImage.getHeight()), new Paint()); in available()
/packages/apps/Camera2/src/com/android/camera/one/v2/camera2proxy/
DForwardingImageProxy.java92 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()
DAndroidImageProxy.java107 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/Gallery/src/com/android/camera/
DRotateBitmap.java60 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()
DImageViewTouchBase.java155 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()
/packages/services/BuiltInPrintService/src/com/android/bips/
DImageToPdfTask.java78 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/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
DImageShow.java126 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 …]
DImageCrop.java233 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/ui/
DProgressSpinner.java41 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()
DSlideshowView.java69 mCurrentTexture.getWidth(), mCurrentTexture.getHeight(), in next()
73 mCurrentTexture.getHeight(), mCurrentTexture.getWidth(), in next()
104 mPrevTexture.draw(canvas, -mPrevTexture.getWidth() / 2, in render()
114 mCurrentTexture.draw(canvas, -mCurrentTexture.getWidth() / 2, in render()
139 int viewWidth = getWidth(); in apply()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/
DSelfManagedAnswerVideoCallScreen.java130 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/TV/src/com/android/tv/util/images/
DBitmapUtils.java74 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/Settings/src/com/android/settings/fuelgauge/
DBatteryActiveView.java37 if (getWidth() != 0) { in setProvider()
45 if (getWidth() != 0) { in onSizeChanged()
68 start / period * getWidth(), 0, end / period * getWidth(), getHeight(), mPaint); in drawColor()
/packages/apps/Camera2/src/com/android/camera/
DAnimationManager.java50 float slideDistance = (float) (parentView.getWidth() - view.getLeft()); in startCaptureAnimation()
52 float scaleX = ((float) parentView.getWidth()) / ((float) view.getWidth()); in startCaptureAnimation()
56 int centerX = view.getLeft() + view.getWidth() / 2; in startCaptureAnimation()
95 parentView.getWidth() / 2 - centerX, 0f) in startCaptureAnimation()
/packages/apps/DevCamera/src/com/android/devcamera/
DApi2Camera.java202 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 …]
DCameraInfoCache.java199 float activeWidthFraction = activeArraySize.width() / (float) pixelArraySize.getWidth(); in getFieldOfView()
206 2 * Math.atan(physicalSize.getWidth() * activeWidthFraction / 2 / focalLength)); in getFieldOfView()
219 if (sizes[j].getHeight() * sizes[j].getWidth() > area) { in returnLargestSize()
220 area = sizes[j].getHeight() * sizes[j].getWidth(); in returnLargestSize()
232 return (mActiveArea.width() - mLargestYuvSize.getWidth()) / 2; in faceOffsetX()
256 float aspect = mLargestYuvSize.getWidth() / mLargestYuvSize.getHeight(); in getPreviewSize()
/packages/modules/OnDevicePersonalization/tests/cts/endtoend/src/com/android/ondevicepersonalization/cts/e2e/
DRequestSurfacePackageTests.java150 surfaceView.getWidth(), in testRequestSurfacePackageSuccess()
201 surfaceView.getWidth(), in testRequestSurfacePackageThrowsIfSurfacePackageTokenMissing()
220 surfaceView.getWidth(), in testRequestSurfacePackageThrowsIfSurfaceViewHostTokenMissing()
239 surfaceView.getWidth(), in testRequestSurfacePackageThrowsIfInvalidDisplayId()
277 surfaceView.getWidth(), in testRequestSurfacePackageThrowsIfInvalidHeight()
296 surfaceView.getWidth(), in testRequestSurfacePackageThrowsIfExecutorMissing()
315 surfaceView.getWidth(), in testRequestSurfacePackageThrowsIfOutcomeReceiverMissing()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/
DWallpaperPreviewBitmapTransformation.java58 new Point(toTransform.getWidth(), toTransform.getHeight()), in transform()
60 Rect originalSize = new Rect(0, 0, toTransform.getWidth(), in transform()
62 Point scaledThumbnailSize = new Point(Math.round(toTransform.getWidth() * scale), in transform()
80 return BitmapProcessor.createLowResBitmap(cropped, cropped.getWidth(), cropped.getHeight()); in transform()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DPhotoProcessor.java200 int cropWidth = original.getWidth(); in getNormalizedBitmap()
228 c.drawRect(0, 0, scaledBitmap.getWidth(), scaledBitmap.getHeight(), WHITE_PAINT); in getNormalizedBitmap()
233 final RectF dst = new RectF(0, 0, scaledBitmap.getWidth(), scaledBitmap.getHeight()); in getNormalizedBitmap()
286 (mDisplayPhoto.getWidth() > mThumbnailPhoto.getWidth() || in getThumbnailPhotoBytes()

12345678910>>...27