Searched refs:scale (Results 51 - 75 of 183) sorted by relevance

12345678

/packages/apps/Launcher3/src/com/android/launcher3/widget/
H A DPendingItemDragHelper.java79 final float scale;
111 scale = previewBounds.width() / (float) preview.getWidth();
121 scale = ((float) launcher.getDeviceProfile().iconSizePx) / preview.getWidth();
148 + (int) ((scale * preview.getWidth() - preview.getWidth()) / 2);
150 + (int) ((scale * preview.getHeight() - preview.getHeight()) / 2);
155 dragOffset, dragRegion, scale, options);
/packages/apps/Gallery/src/com/android/camera/
H A DUtil.java196 float scale = targetHeight / bitmapHeightF;
197 if (scale < .9F || scale > 1F) {
198 scaler.setScale(scale, scale);
203 float scale = targetWidth / bitmapWidthF;
204 if (scale < .9F || scale > 1F) {
205 scaler.setScale(scale, scale);
[all...]
/packages/apps/Launcher3/src/com/android/launcher3/
H A DUtilities.java161 * this scale factor is assumed to be equal in X and Y, and so if at any point this
162 * assumption fails, we will need to return a pair of scale factors.
169 float scale = 1.0f;
182 scale *= v.getScaleX();
189 return scale;
236 public static void scaleRectAboutCenter(Rect r, float scale) { argument
237 if (scale != 1.0f) {
242 r.left = (int) (r.left * scale + 0.5f);
243 r.top = (int) (r.top * scale + 0.5f);
244 r.right = (int) (r.right * scale
[all...]
H A DFastBitmapDrawable.java293 float scale = 1f - brightnessF;
295 mat[0] = scale;
296 mat[6] = scale;
297 mat[12] = scale;
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
H A DPhotoView.java681 float scale = 1f; // the scaling factor due to card effect
700 scale = getScrollScale(progress);
702 scale = interpolate(filmRatio, scale, 1f);
705 imageScale *= scale;
717 cxPage = (right - left) * scale / 2f;
733 int s = (int) (scale * Math.min(r.width(), r.height()) + 0.5f);
748 int viewW, int viewH, float scale) {
752 int centerX = (int) (imageW / 2f + (viewW / 2f - cx) / scale + 0.5f);
753 int centerY = (int) (imageH / 2f + (viewH / 2f - cy) / scale
747 setTileViewPosition(float cx, float cy, int viewW, int viewH, float scale) argument
1160 onScale(float focusX, float focusY, float scale) argument
[all...]
H A DAlbumLabelMaker.java192 float scale = (float) s.iconSize / icon.getWidth();
194 Math.round(scale * icon.getHeight()))/2f);
195 canvas.scale(scale, scale);
H A DTiledScreenNail.java80 float scale = Math.min(1, (float) sMaxSide / Math.max(width, height));
81 mWidth = Math.round(scale * width);
82 mHeight = Math.round(scale * height);
H A DTileImageView.java205 private void layoutTiles(int centerX, int centerY, float scale, int rotation) { argument
216 mLevel = Utils.clamp(Utils.floorLog2(1f / scale), 0, mLevelCount);
219 // we use for display. So it can be faster when the scale moves to the
220 // next level. We choose a level closer to the current scale.
223 getRange(range, centerX, centerY, mLevel, scale, rotation);
224 mOffsetX = Math.round(width / 2f + (range.left - centerX) * scale);
225 mOffsetY = Math.round(height / 2f + (range.top - centerY) * scale);
226 fromLevel = scale * (1 << mLevel) > 0.75f ? mLevel - 1 : mLevel;
230 mOffsetX = Math.round(width / 2f - centerX * scale);
231 mOffsetY = Math.round(height / 2f - centerY * scale);
301 getRange(Rect out, int cX, int cY, int level, float scale, int rotation) argument
354 setPosition(int centerX, int centerY, float scale, int rotation) argument
[all...]
/packages/apps/Launcher3/src/com/android/launcher3/folder/
H A DFolderAnimationManager.java78 new Property<View, Float>(Float.class, "scale") {
85 public void set(View view, Float scale) {
86 view.setScaleX(scale);
87 view.setScaleY(scale);
131 // Match size/scale of icons in the preview
137 float scale = mIsOpening ? initialScale : finalScale;
138 mFolder.setScaleX(scale);
139 mFolder.setScaleY(scale);
266 // Match scale of icons in the preview of the items on the first page.
273 float scale
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/anim/
H A DStateTransitionAnimation.java146 private void applyOldTexture(GLView view, GLCanvas canvas, float alpha, float scale, boolean clear) { argument
155 canvas.scale(scale, scale, 1);
170 canvas.scale(mCurrentContentScale, mCurrentContentScale, 1);
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/
H A DIconView.java211 float scale = Math.max(scaleWidth, scaleHeight);
212 float dx = (mBitmapBounds.width() - (mBitmap.getWidth() * scale)) / 2f;
213 float dy = (mBitmapBounds.height() - (mBitmap.getHeight() * scale)) / 2f;
216 m.postScale(scale, scale);
/packages/apps/Gallery2/src/com/android/photos/
H A DBitmapRegionTileSource.java191 float scale = (float) targetSize / Math.max(mWidth, mHeight);
192 mOptions.inSampleSize = BitmapUtils.computeSampleSizeLarger(scale);
202 scale = (float) targetSize / (float) (Math.max(result.getWidth(), result.getHeight()));
204 if (scale <= 0.5) {
205 result = BitmapUtils.resizeBitmapByScale(result, scale, true);
/packages/apps/Launcher3/src/com/android/launcher3/accessibility/
H A DWorkspaceAccessibilityHelper.java142 // ExploreByTouchHelper does not currently handle view scale.
146 float scale = dragLayer.getDescendantCoordRelativeToSelf(mView, mTempCords);
149 mTempRect.left = mTempCords[0] + (int) (mTempRect.left * scale);
150 mTempRect.right = mTempCords[0] + (int) (mTempRect.right * scale);
151 mTempRect.top = mTempCords[1] + (int) (mTempRect.top * scale);
152 mTempRect.bottom = mTempCords[1] + (int) (mTempRect.bottom * scale);
/packages/apps/Launcher3/src/com/android/launcher3/graphics/
H A DShadowGenerator.java115 float scale = 1;
120 scale = (HALF_DISTANCE - BLUR_FACTOR) / (HALF_DISTANCE - minSide);
125 scale = Math.min(scale, (HALF_DISTANCE - bottomSpace) / (HALF_DISTANCE - bounds.bottom));
127 return scale;
/packages/services/Car/tests/InstrumentClusterRendererSample/src/com/android/car/cluster/sample/
H A DBitmapUtils.java48 * @param bm The bitmap to scale.
61 float scale = heightScale > widthScale ? heightScale : widthScale;
62 int scaleWidth = (int) Math.ceil(bm.getWidth() * scale);
63 int scaleHeight = (int) Math.ceil(bm.getHeight() * scale);
66 // If you try to scale an image down too much in one go, you can end up with discontinuous
67 // interpolation. Therefore, if necessary, we scale the image to twice the desired size
69 if (scale < .5f) {
73 if (scale != 1f) {
/packages/apps/Camera2/src/com/android/camera/
H A DAnimationManager.java54 float scale = scaleX > scaleY ? scaleX : scaleY;
90 ObjectAnimator.ofFloat(view, "scaleX", scale, 1f)
92 ObjectAnimator.ofFloat(view, "scaleY", scale, 1f)
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
H A DBitmapWorkerOptions.java83 double scale = (double) MAX_IMAGE_DIMENSION_PX / largestDim;
84 mWidth *= scale;
85 mHeight *= scale;
/packages/apps/Launcher2/src/com/android/launcher2/
H A DCling.java129 final float scale = LauncherApplication.getScreenDensity();
130 final int cornerXOffset = (int) (scale * 15);
131 final int cornerYOffset = (int) (scale * 10);
233 float scale = mRevealRadius / mPunchThroughGraphicCenterRadius;
234 int dw = (int) (scale * mPunchThroughGraphic.getIntrinsicWidth());
235 int dh = (int) (scale * mPunchThroughGraphic.getIntrinsicHeight());
H A DWallpaperChooserDialogFragment.java344 float scale = 1.0f;
347 scale = Math.max((float) vwidth / (float) dwidth,
351 float dx = (vwidth - dwidth * scale) * 0.5f + 0.5f;
352 float dy = (vheight - dheight * scale) * 0.5f + 0.5f;
355 mMatrix.setScale(scale, scale);
H A DDeleteDropTarget.java210 float scale = (float) to.width() / from.width();
221 dragLayer.animateView(d.dragView, from, to, scale, 1f, 1f, 0.1f, 0.1f,
300 float scale = dragView.getScaleX();
301 float x1o = ((1f - scale) * dragView.getMeasuredWidth()) / 2f;
302 float y1o = ((1f - scale) * dragView.getMeasuredHeight()) / 2f;
349 float scale = dragView.getScaleX();
350 float xOffset = ((scale - 1f) * dragView.getMeasuredWidth()) / 2f;
351 float yOffset = ((scale - 1f) * dragView.getMeasuredHeight()) / 2f;
H A DDragLayer.java300 float scale = getDescendantCoordRelativeToSelf(descendant, mTmpXY);
303 return scale;
319 * this scale factor is assumed to be equal in X and Y, and so if at any point this
320 * assumption fails, we will need to return a pair of scale factors.
323 float scale = 1.0f;
326 scale *= descendant.getScaleX();
333 scale *= view.getScaleX();
340 return scale;
491 float scale = getDescendantCoordRelativeToSelf((View) child.getParent(), coord);
492 // We need to account for the scale o
[all...]
H A DDragView.java62 * @param bitmap The view that we're dragging around. We scale it up when we draw it.
76 final float scale = (width + scaleDps) / width;
78 // Set the initial scale to avoid any jumps
95 setScaleX(initialScale + (value * (scale - initialScale)));
96 setScaleY(initialScale + (value * (scale - initialScale)));
195 canvas.scale(sX, sY);
/packages/apps/Camera2/src/com/android/camera/tinyplanet/
H A DTinyPlanetFragment.java464 float scale = intermediateWidth / (float) fullPanoWidth;
468 (int) (fullPanoWidth * scale), (int) (fullPanoHeight * scale),
472 scale /= 2;
479 RectF destRect = new RectF(left * scale, top * scale, right * scale, bottom * scale);
/packages/apps/WallpaperPicker/src/com/android/gallery3d/common/
H A DUtils.java131 * Find the min x that 1 / x >= scale
133 public static int computeSampleSizeLarger(float scale) { argument
134 int initialSize = (int) Math.floor(1f / scale);
/packages/apps/Dialer/java/com/android/incallui/answer/impl/hint/
H A DPawAnswerHint.java144 Animator scale =
161 set.play(scale).with(alpha);
172 Animator scale =
189 set.play(scale).with(alpha);

Completed in 2508 milliseconds

12345678