Home
last modified time | relevance | path

Searched refs:scale (Results 1 – 25 of 217) sorted by relevance

123456789

/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/
DCropView.java99 final float scale = mRenderer.scale; in getEdgesHelper() local
101 * scale + width / 2f; in getEdgesHelper()
103 * scale + height / 2f; in getEdgesHelper()
104 float leftEdge = centerX - imageWidth / 2f * scale; in getEdgesHelper()
105 float rightEdge = centerX + imageWidth / 2f * scale; in getEdgesHelper()
106 float topEdge = centerY - imageHeight / 2f * scale; in getEdgesHelper()
107 float bottomEdge = centerY + imageHeight / 2f * scale; in getEdgesHelper()
122 final float scale = mRenderer.scale; in getCrop() local
124 float cropLeft = -edges.left / scale; in getCrop()
125 float cropTop = -edges.top / scale; in getCrop()
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DBitmapUtils.java97 public static int computeSampleSizeLarger(float scale) { in computeSampleSizeLarger() argument
98 int initialSize = (int) Math.floor(1d / scale); in computeSampleSizeLarger()
107 public static int computeSampleSize(float scale) { in computeSampleSize() argument
108 Utils.assertTrue(scale > 0); in computeSampleSize()
109 int initialSize = Math.max(1, (int) Math.ceil(1 / scale)); in computeSampleSize()
116 Bitmap bitmap, float scale, boolean recycle) { in resizeBitmapByScale() argument
117 int width = Math.round(bitmap.getWidth() * scale); in resizeBitmapByScale()
118 int height = Math.round(bitmap.getHeight() * scale); in resizeBitmapByScale()
123 canvas.scale(scale, scale); in resizeBitmapByScale()
142 float scale = Math.min( in resizeDownBySideLength() local
[all …]
/packages/apps/Launcher3/iconloaderlib/src/com/android/launcher3/icons/
DBaseIconFactory.java134 int iconAppTargetSdk, boolean isInstantApp, float[] scale) { in createBadgedIconBitmap() argument
137 return createBadgedIconBitmap(icon, user, shrinkNonAdaptiveIcons, isInstantApp, scale); in createBadgedIconBitmap()
158 boolean shrinkNonAdaptiveIcons, boolean isInstantApp, float[] scale) { in createBadgedIconBitmap() argument
159 if (scale == null) { in createBadgedIconBitmap()
160 scale = new float[1]; in createBadgedIconBitmap()
162 icon = normalizeAndWrapToAdaptiveIcon(icon, shrinkNonAdaptiveIcons, null, scale); in createBadgedIconBitmap()
163 Bitmap bitmap = createIconBitmap(icon, scale[0]); in createBadgedIconBitmap()
187 float[] scale = new float[1]; in createScaledBitmapWithoutShadow() local
188 icon = normalizeAndWrapToAdaptiveIcon(icon, shrinkNonAdaptiveIcons, iconBounds, scale); in createScaledBitmapWithoutShadow()
190 Math.min(scale[0], ShadowGenerator.getScaleForBounds(iconBounds))); in createScaledBitmapWithoutShadow()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/ui/
DMtpImageView.java130 float scale; in updateDrawMatrix() local
140 scale = 1.0f; in updateDrawMatrix()
142 scale = Math.min(vwidth / dwidth, vheight / dheight); in updateDrawMatrix()
144 mDrawMatrix.setScale(scale, scale); in updateDrawMatrix()
146 mDrawMatrix.postTranslate(-dheight * scale * 0.5f, in updateDrawMatrix()
147 -dwidth * scale * 0.5f); in updateDrawMatrix()
149 mDrawMatrix.postTranslate(dwidth * scale * 0.5f, in updateDrawMatrix()
150 dheight * scale * 0.5f); in updateDrawMatrix()
152 mDrawMatrix.postTranslate((vwidth - dwidth * scale) * 0.5f, in updateDrawMatrix()
153 (vheight - dheight * scale) * 0.5f); in updateDrawMatrix()
[all …]
/packages/apps/Gallery2/src/com/android/photos/drawables/
DAutoThumbnailDrawable.java127 float scale; in updateDrawMatrixLocked() local
137 scale = (float) vheight / (float) dheight; in updateDrawMatrixLocked()
138 dx = (vwidth - dwidth * scale) * 0.5f; in updateDrawMatrixLocked()
140 scale = (float) vwidth / (float) dwidth; in updateDrawMatrixLocked()
141 dy = (vheight - dheight * scale) * 0.5f; in updateDrawMatrixLocked()
143 if (scale < .8f) { in updateDrawMatrixLocked()
144 Log.w(TAG, "sample size was too small! Overdrawing! " + scale + ", " + mSampleSize); in updateDrawMatrixLocked()
145 } else if (scale > 1.5f) { in updateDrawMatrixLocked()
146 Log.w(TAG, "Potential quality loss! " + scale + ", " + mSampleSize); in updateDrawMatrixLocked()
149 mDrawMatrix.setScale(scale, scale); in updateDrawMatrixLocked()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
DImageShow.java426 canvas.scale(maskScale, maskScale); in drawImageAndAnimate()
440 canvas.scale(finalScale, finalScale, centerX, centerY); in drawImageAndAnimate()
456 canvas.scale(1, master.getAnimRotationValue(), centerX, centerY); in drawImageAndAnimate()
458 canvas.scale(1, master.getAnimRotationValue(), centerX, centerY); in drawImageAndAnimate()
460 canvas.scale(master.getAnimRotationValue(), 1, centerX, centerY); in drawImageAndAnimate()
462 canvas.scale(master.getAnimRotationValue(), 1, centerX, centerY); in drawImageAndAnimate()
466 canvas.scale(master.getAnimRotationValue(), 1, centerX, centerY); in drawImageAndAnimate()
468 canvas.scale(master.getAnimRotationValue(), 1, centerX, centerY); in drawImageAndAnimate()
470 canvas.scale(1, master.getAnimRotationValue(), centerX, centerY); in drawImageAndAnimate()
472 canvas.scale(1, master.getAnimRotationValue(), centerX, centerY); in drawImageAndAnimate()
[all …]
DGeometryMathUtils.java184 public static void scaleRect(RectF r, float scale) { in scaleRect() argument
185 r.set(r.left * scale, r.top * scale, r.right * scale, r.bottom * scale); in scaleRect()
204 public static float scale(float oldWidth, float oldHeight, float newWidth, float newHeight) { in scale() method in GeometryMathUtils
355 float scale = w / pw; in getPartialToScreenMatrix() local
357 scale = h / ph; in getPartialToScreenMatrix()
359 scale = scale * cScale; in getPartialToScreenMatrix()
363 compensation.postScale(scale, scale, cx, cy); in getPartialToScreenMatrix()
448 float scale = GeometryMathUtils.scale(bw, bh, viewWidth, viewHeight); in getFullGeometryToScreenMatrix() local
449 scale *= SHOW_SCALE; in getFullGeometryToScreenMatrix()
452 m.postScale(scale, scale); in getFullGeometryToScreenMatrix()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DImageViewTouchBase.java271 float scale = Math.min(widthScale, heightScale); in getProperBaseMatrix() local
274 matrix.postScale(scale, scale); in getProperBaseMatrix()
277 (viewWidth - w * scale) / 2F, in getProperBaseMatrix()
278 (viewHeight - h * scale) / 2F); in getProperBaseMatrix()
307 protected void zoomTo(float scale, float centerX, float centerY) { in zoomTo() argument
308 if (scale > mMaxZoom) { in zoomTo()
309 scale = mMaxZoom; in zoomTo()
313 float deltaScale = scale / oldScale; in zoomTo()
320 protected void zoomTo(final float scale, final float centerX, in zoomTo() argument
322 final float incrementPerMs = (scale - getScale()) / durationMs; in zoomTo()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/graphics/
DDragPreviewProvider.java81 protected void drawDragView(Canvas destCanvas, float scale) { in drawDragView() argument
83 destCanvas.scale(scale, scale); in drawDragView()
131 float scale = ((LauncherAppWidgetHostView) mView).getScaleToFit(); in createDragBitmap() local
132 width = (int) (mView.getWidth() * scale); in createDragBitmap()
133 height = (int) (mView.getHeight() * scale); in createDragBitmap()
138 height + blurSizeOutline, (c) -> drawDragView(c, scale)); in createDragBitmap()
142 height + blurSizeOutline, (c) -> drawDragView(c, scale)); in createDragBitmap()
171 float scale = Launcher.getLauncher(mView.getContext()) in getScaleAndPosition() local
176 scale /= ((LauncherAppWidgetHostView) mView).getScaleToFit(); in getScaleAndPosition()
180 (preview.getWidth() - scale * mView.getWidth() * mView.getScaleX()) / 2); in getScaleAndPosition()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/folder/
DPreviewItemDrawingParams.java26 float scale; field in PreviewItemDrawingParams
32 PreviewItemDrawingParams(float transX, float transY, float scale, float overlayAlpha) { in PreviewItemDrawingParams() argument
35 this.scale = scale; in PreviewItemDrawingParams()
39 public void update(float transX, float transY, float scale) { in update() argument
44 || anim.finalState[0] == scale) { in update()
52 this.scale = scale; in update()
/packages/apps/Gallery2/src/com/android/photos/views/
DTiledImageView.java64 float scale; field in TiledImageView.ImageRendererWrapper
162 mRenderer.scale = 0; in setTileSource()
182 || renderer.scale > 0 || getWidth() == 0) { in updateScaleIfNecessaryLocked()
185 renderer.scale = Math.min( in updateScaleIfNecessaryLocked()
261 float scale = mValues[Matrix.MSCALE_X]; in positionFromMatrix() local
262 int xoffset = Math.round((getWidth() - mTempRectF.width()) / 2 / scale); in positionFromMatrix()
263 int yoffset = Math.round((getHeight() - mTempRectF.height()) / 2 / scale); in positionFromMatrix()
265 cx += (mTempRectF.left / scale) - xoffset; in positionFromMatrix()
267 cx -= (mTempRectF.left / scale) - xoffset; in positionFromMatrix()
270 cy += (mTempRectF.top / scale) - yoffset; in positionFromMatrix()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/widget/
DWallpaperThumbnailView.java61 float scale; in recomputeImageMatrix() local
63 scale = (float) viewHeight / drawableHeight; in recomputeImageMatrix()
65 scale = (float) viewWidth / drawableWidth; in recomputeImageMatrix()
69 matrix.setScale(scale, scale); in recomputeImageMatrix()
72 if ((drawableHeight * scale) > viewHeight) { in recomputeImageMatrix()
73 float dy = -(((drawableHeight * scale) - viewHeight) / 2f); in recomputeImageMatrix()
79 float dx = -((drawableWidth * scale) - viewWidth); in recomputeImageMatrix()
/packages/apps/Launcher3/src/com/android/launcher3/
DUtilities.java224 float scale = 1.0f; in getDescendantCoordRelativeToAncestor() local
249 scale *= v.getScaleX(); in getDescendantCoordRelativeToAncestor()
253 return scale; in getDescendantCoordRelativeToAncestor()
312 public static void scaleRectFAboutCenter(RectF r, float scale) { in scaleRectFAboutCenter() argument
313 if (scale != 1.0f) { in scaleRectFAboutCenter()
317 r.left = r.left * scale; in scaleRectFAboutCenter()
318 r.top = r.top * scale ; in scaleRectFAboutCenter()
319 r.right = r.right * scale; in scaleRectFAboutCenter()
320 r.bottom = r.bottom * scale; in scaleRectFAboutCenter()
325 public static void scaleRectAboutCenter(Rect r, float scale) { in scaleRectAboutCenter() argument
[all …]
DDeviceProfile.java304 float scale = maxHeight / usedHeight; in updateAvailableDimensions() local
305 updateIconSize(scale, res, dm); in updateAvailableDimensions()
310 private void updateIconSize(float scale, Resources res, DisplayMetrics dm) { in updateIconSize() argument
314 iconSizePx = Math.max(1, (int) (ResourceUtils.pxFromDp(invIconSizePx, dm) * scale)); in updateIconSize()
315 iconTextSizePx = (int) (Utilities.pxFromSp(inv.iconTextSize, dm) * scale); in updateIconSize()
316 iconDrawablePaddingPx = (int) (iconDrawablePaddingOriginalPx * scale); in updateIconSize()
387 float scale = Math.min(scaleX, scaleY); in updateAvailableFolderCellDimensions() local
388 if (scale < 1f) { in updateAvailableFolderCellDimensions()
389 updateFolderCellSize(scale, dm, res); in updateAvailableFolderCellDimensions()
393 private void updateFolderCellSize(float scale, DisplayMetrics dm, Resources res) { in updateFolderCellSize() argument
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
DImageFilterTinyPlanet.java71 Bitmap bitmapIn, int width, int height, Bitmap bitmapOut, int outSize, float scale, in nativeApplyFilter() argument
129 float scale = intermediateWidth / (float) fullPanoWidth; in applyXmp() local
133 (int) (fullPanoWidth * scale), (int) (fullPanoHeight * scale), in applyXmp()
137 scale /= 2; in applyXmp()
144 RectF destRect = new RectF(left * scale, top * scale, right * scale, bottom * scale); in applyXmp()
/packages/apps/Dialer/java/com/android/dialer/lettertile/
DLetterTileDrawable.java110 private float scale = 1.0f; field in LetterTileDrawable
140 private Rect getScaledBounds(float scale, float offset) { in getScaledBounds() argument
145 final int halfLength = (int) (scale * Math.min(destRect.width(), destRect.height()) / 2); in getScaledBounds()
158 scale = VECTOR_ICON_SCALE; in getDrawableForContactType()
161 scale = VECTOR_ICON_SCALE; in getDrawableForContactType()
164 scale = VECTOR_ICON_SCALE; in getDrawableForContactType()
167 scale = VECTOR_ICON_SCALE; in getDrawableForContactType()
217 paint.setTextSize(scale * letterToTileRatio * minDimension); in drawLetterTile()
240 drawable.setBounds(getScaledBounds(scale, offset)); in drawLetterTile()
306 public LetterTileDrawable setScale(float scale) { in setScale() argument
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPhotoView.java681 float scale = 1f; // the scaling factor due to card effect in drawTileView() local
700 scale = getScrollScale(progress); in drawTileView()
702 scale = interpolate(filmRatio, scale, 1f); in drawTileView()
705 imageScale *= scale; in drawTileView()
717 cxPage = (right - left) * scale / 2f; in drawTileView()
733 int s = (int) (scale * Math.min(r.width(), r.height()) + 0.5f); in drawTileView()
748 int viewW, int viewH, float scale) { in setTileViewPosition() argument
752 int centerX = (int) (imageW / 2f + (viewW / 2f - cx) / scale + 0.5f); in setTileViewPosition()
753 int centerY = (int) (imageH / 2f + (viewH / 2f - cy) / scale + 0.5f); in setTileViewPosition()
766 mTileView.setPosition(x, y, scale, mRotation); in setTileViewPosition()
[all …]
DTileImageView.java205 private void layoutTiles(int centerX, int centerY, float scale, int rotation) { in layoutTiles() argument
216 mLevel = Utils.clamp(Utils.floorLog2(1f / scale), 0, mLevelCount); in layoutTiles()
223 getRange(range, centerX, centerY, mLevel, scale, rotation); in layoutTiles()
224 mOffsetX = Math.round(width / 2f + (range.left - centerX) * scale); in layoutTiles()
225 mOffsetY = Math.round(height / 2f + (range.top - centerY) * scale); in layoutTiles()
226 fromLevel = scale * (1 << mLevel) > 0.75f ? mLevel - 1 : mLevel; in layoutTiles()
230 mOffsetX = Math.round(width / 2f - centerX * scale); in layoutTiles()
231 mOffsetY = Math.round(height / 2f - centerY * scale); in layoutTiles()
302 int cX, int cY, int level, float scale, int rotation) { in getRange() argument
315 int left = (int) Math.floor(cX - width / (2f * scale)); in getRange()
[all …]
DPositionController.java838 private int widthOf(Box b, float scale) { in widthOf() argument
839 return (int) (b.mImageW * scale + 0.5f); in widthOf()
843 private int heightOf(Box b, float scale) { in heightOf() argument
844 return (int) (b.mImageH * scale + 0.5f); in heightOf()
1321 private void calculateStableBound(float scale, int horizontalSlack) { in calculateStableBound() argument
1325 int w = widthOf(b, scale); in calculateStableBound()
1326 int h = heightOf(b, scale); in calculateStableBound()
1336 if (viewTallerThanScaledImage(scale)) { in calculateStableBound()
1341 if (viewWiderThanScaledImage(scale)) { in calculateStableBound()
1346 private void calculateStableBound(float scale) { in calculateStableBound() argument
[all …]
DAbstractSlotRenderer.java60 float scale = Math.min( in drawContent() local
63 canvas.scale(scale, scale, 1); in drawContent()
73 float scale = (float) height / v.getHeight(); in drawVideoOverlay() local
74 int w = Math.round(scale * v.getWidth()); in drawVideoOverlay()
75 int h = Math.round(scale * v.getHeight()); in drawVideoOverlay()
/packages/apps/Dialer/java/com/android/dialer/contactphoto/
DContactPhotoManager.java86 if (request.scale != SCALE_DEFAULT) { in getDefaultAvatarUriForContact()
87 builder.appendQueryParameter(SCALE_PARAM_KEY, String.valueOf(request.scale)); in getDefaultAvatarUriForContact()
157 String scale = uri.getQueryParameter(SCALE_PARAM_KEY); in getDefaultImageRequestFromUri() local
158 if (!TextUtils.isEmpty(scale)) { in getDefaultImageRequestFromUri()
159 request.scale = Float.valueOf(scale); in getDefaultImageRequestFromUri()
408 public float scale = SCALE_DEFAULT; field in ContactPhotoManager.DefaultImageRequest
444 float scale, in DefaultImageRequest() argument
450 this.scale = scale; in DefaultImageRequest()
498 drawable.setScale(defaultImageRequest.scale); in getDefaultImageForContact()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/
DWallpaperPreviewBitmapTransformation.java57 float scale = Math.max((float) mDefaultCropSurfaceSize.x / toTransform.getWidth(), in transform() local
59 Point scaledThumbnailSize = new Point(Math.round(toTransform.getWidth() * scale), in transform()
60 Math.round(toTransform.getHeight() * scale)); in transform()
72 Math.round(scaledThumbnailToScreenSize.x / scale), in transform()
73 Math.round(scaledThumbnailToScreenSize.y / scale), in transform()
74 Math.round(mScreenSize.x / scale), in transform()
75 Math.round(mScreenSize.y / scale)); in transform()
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/
DLivePreviewWidgetCell.java80 final float scale; in generateFromRemoteViews() local
82 scale = ((float) previewSize) / viewWidth; in generateFromRemoteViews()
84 bitmapHeight = (int) (viewHeight * scale); in generateFromRemoteViews()
86 scale = 1; in generateFromRemoteViews()
93 c.scale(scale, scale); in generateFromRemoteViews()
/packages/apps/Launcher3/src/com/android/launcher3/states/
DSpringLoadedState.java52 float scale = grid.workspaceSpringLoadShrinkFactor; in getWorkspaceScaleAndTranslation() local
53 return new ScaleAndTranslation(scale, 0, 0); in getWorkspaceScaleAndTranslation()
56 float scale = grid.workspaceSpringLoadShrinkFactor; in getWorkspaceScaleAndTranslation() local
59 float scaledHeight = scale * ws.getNormalChildHeight(); in getWorkspaceScaleAndTranslation()
71 float actualCellTop = myCenter - cellTopFromCenter * scale; in getWorkspaceScaleAndTranslation()
72 return new ScaleAndTranslation(scale, 0, (desiredCellTop - actualCellTop) / scale); in getWorkspaceScaleAndTranslation()
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
DDrawableLoader.java209 int scale = heightScale > widthScale ? heightScale : widthScale; in decodeBitmap() local
210 if (scale <= 1) { in decodeBitmap()
211 scale = 1; in decodeBitmap()
215 scale >>= 1; in decodeBitmap()
217 } while (scale != 0); in decodeBitmap()
218 scale = 1 << (shift - 1); in decodeBitmap()
224 + options.getHeight() + "). Chosen scale: " + scale + " -> " + scale); in decodeBitmap()
233 bitmapOptions.inSampleSize = scale; in decodeBitmap()
236 mOriginalWidth / scale, mOriginalHeight / scale); in decodeBitmap()

123456789