/frameworks/base/core/java/android/view/ |
D | MagnificationSpec.java | 34 public float scale = 1.0f; field in MagnificationSpec 52 public void initialize(float scale, float offsetX, float offsetY) { in initialize() argument 53 if (scale < 1) { in initialize() 56 this.scale = scale; in initialize() 62 return scale == 1.0f && offsetX == 0 && offsetY == 0; in isNop() 67 info.scale = other.scale; in obtain() 84 scale = 1.0f; in clear() 90 scale = other.scale; in setTo() 102 parcel.writeFloat(scale); in writeToParcel() 119 return scale == s.scale && offsetX == s.offsetX && offsetY == s.offsetY; in equals() [all …]
|
/frameworks/base/packages/WallpaperCropper/src/com/android/wallpapercropper/ |
D | CropView.java | 99 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 …]
|
/frameworks/native/libs/input/ |
D | VelocityControl.cpp | 72 float scale = mParameters.scale; in move() local 74 float speed = hypotf(vx, vy) * scale; in move() 77 scale *= mParameters.acceleration; in move() 81 scale *= 1 + (speed - mParameters.lowThreshold) in move() 89 mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold, in move() 91 vx, vy, speed, scale / mParameters.scale); in move() 96 mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold, in move() 102 *deltaX *= scale; in move() 105 *deltaY *= scale; in move()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
D | MagnificationControllerTest.java | 197 final float scale = 2.0f; 199 final PointF offsets = computeOffsets(INITIAL_MAGNIFICATION_BOUNDS, center, scale); 201 .setScale(scale, center.x, center.y, false, SERVICE_ID_1)); 203 final MagnificationSpec expectedSpec = getMagnificationSpec(scale, offsets); 215 float scale = 2.0f; 218 .setScale(scale, pivotPoint.x, pivotPoint.y, true, SERVICE_ID_1)); 223 PointF offsets = computeOffsets(INITIAL_MAGNIFICATION_BOUNDS, newCenter, scale); 224 MagnificationSpec endSpec = getMagnificationSpec(scale, offsets); 255 float scale = 2.0f; 256 assertTrue(mMagnificationController.setScale(scale, [all …]
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 97 public static int computeSampleSizeLarger(float scale) { in computeSampleSizeLarger() argument 98 int initialSize = (int) Math.floor(1 / 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 …]
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | MagnificationController.java | 226 return mCurrentMagnificationSpec.scale > 1.0f; in isMagnifying() 303 return mCurrentMagnificationSpec.scale; in getScale() 361 return mSpecAnimationBridge.mSentMagnificationSpec.scale; in getSentScale() 430 public boolean setScale(float scale, float pivotX, float pivotY, boolean animate, int id) { in setScale() argument 436 scale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in setScale() 441 final float oldScale = spec.scale; in setScale() 446 final float offsetX = (oldCenterX - normPivotX) * (oldScale / scale); in setScale() 447 final float offsetY = (oldCenterY - normPivotY) * (oldScale / scale); in setScale() 451 return setScaleAndCenterLocked(scale, centerX, centerY, animate, id); in setScale() 495 float scale, float centerX, float centerY, boolean animate, int id) { in setScaleAndCenter() argument [all …]
|
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/ |
D | DocumentaryFilter.java | 144 float scale[] = new float[2]; in initParameters() local 146 scale[0] = 1f; in initParameters() 147 scale[1] = ((float) mHeight) / mWidth; in initParameters() 149 scale[0] = ((float) mWidth) / mHeight; in initParameters() 150 scale[1] = 1f; in initParameters() 152 float max_dist = ((float) Math.sqrt(scale[0] * scale[0] + scale[1] * scale[1])) * 0.5f; in initParameters() 154 mProgram.setHostValue("scale", scale); in initParameters()
|
D | VignetteFilter.java | 94 float scale[] = new float[2]; in initParameters() local 96 scale[0] = 1f; in initParameters() 97 scale[1] = ((float) mHeight) / mWidth; in initParameters() 99 scale[0] = ((float) mWidth) / mHeight; in initParameters() 100 scale[1] = 1f; in initParameters() 102 float max_dist = ((float) Math.sqrt(scale[0] * scale[0] + scale[1] * scale[1])) * 0.5f; in initParameters() 103 mProgram.setHostValue("scale", scale); in initParameters()
|
D | LomoishFilter.java | 153 float scale[] = new float[2]; in initParameters() local 155 scale[0] = 1f; in initParameters() 156 scale[1] = ((float) mHeight) / mWidth; in initParameters() 158 scale[0] = ((float) mWidth) / mHeight; in initParameters() 159 scale[1] = 1f; in initParameters() 161 float max_dist = ((float) Math.sqrt(scale[0] * scale[0] + scale[1] * scale[1])) * 0.5f; in initParameters() 163 mProgram.setHostValue("scale", scale); in initParameters()
|
D | FisheyeFilter.java | 145 float scale[] = new float[2]; in updateProgramParams() local 147 scale[0] = 1f; in updateProgramParams() 148 scale[1] = ((float) mHeight) / mWidth; in updateProgramParams() 150 scale[0] = ((float) mWidth) / mHeight; in updateProgramParams() 151 scale[1] = 1f; in updateProgramParams() 154 float bound2 = 0.25f * (scale[0] * scale[0] + scale[1] * scale[1]); in updateProgramParams() 162 mProgram.setHostValue("scale", scale); in updateProgramParams()
|
D | StraightenFilter.java | 138 float scale = 0.5f * Math.min( mWidth / maxWidth, in updateParameters() local 141 p0.set(scale * p0.x / mWidth + 0.5f, scale * p0.y / mHeight + 0.5f); in updateParameters() 142 p1.set(scale * p1.x / mWidth + 0.5f, scale * p1.y / mHeight + 0.5f); in updateParameters() 143 p2.set(scale * p2.x / mWidth + 0.5f, scale * p2.y / mHeight + 0.5f); in updateParameters() 144 p3.set(scale * p3.x / mWidth + 0.5f, scale * p3.y / mHeight + 0.5f); in updateParameters()
|
/frameworks/base/core/java/android/content/res/ |
D | CompatibilityInfo.java | 255 int dens, float scale, float invertedScale) { in CompatibilityInfo() argument 258 applicationScale = scale; in CompatibilityInfo() 325 rect.scale(applicationInvertedScale); in translateRectInScreenToAppWinFrame() 332 transparentRegion.scale(applicationScale); in translateRegionInWindowToScreen() 358 canvas.scale(applicationScale, applicationScale); in translateCanvas() 365 event.scale(applicationInvertedScale); in translateEventInScreenToAppWindow() 373 params.scale(applicationScale); in translateWindowLayout() 380 rect.scale(applicationScale); in translateRectInAppWindowToScreen() 387 rect.scale(applicationInvertedScale); in translateRectInScreenToAppWindow() 394 final float scale = applicationInvertedScale; in translatePointInScreenToAppWindow() local [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/ |
D | TaskViewTransform.java | 55 public float scale = 1f; field in TaskViewTransform 70 scale = tv.getScaleX(); in fillIn() 83 scale = other.scale; in copyFrom() 96 && scale == other.scale in isSame() 108 scale = 1f; in reset() 122 return (Float.compare(scale, v) != 0); in hasScaleChangedFrom() 149 v.setScaleX(scale); in applyToTaskView() 150 v.setScaleY(scale); in applyToTaskView() 167 PropertyValuesHolder.ofFloat(View.SCALE_X, v.getScaleX(), scale), in applyToTaskView() 168 PropertyValuesHolder.ofFloat(View.SCALE_Y, v.getScaleX(), scale)); in applyToTaskView()
|
/frameworks/native/include/input/ |
D | VelocityControl.h | 37 float scale; member 65 scale(1.0f), lowThreshold(0.0f), highThreshold(0.0f), acceleration(1.0f) { in VelocityControlParameters() 68 VelocityControlParameters(float scale, float lowThreshold, in VelocityControlParameters() 70 scale(scale), lowThreshold(lowThreshold), in VelocityControlParameters()
|
/frameworks/opt/bitmap/src/com/android/bitmap/util/ |
D | BitmapUtils.java | 73 final float scale = Math.min(sampleSize, regularScale); in calculateCroppedSrcRect() local 75 final int srcCroppedW = Math.round(dstW * scale); in calculateCroppedSrcRect() 76 final int srcCroppedH = Math.round(dstH * scale); in calculateCroppedSrcRect() 77 final int srcCroppedSliceH = Math.round(dstSliceH * scale); in calculateCroppedSrcRect() 118 final float scale = Math.min(sampleSize, regularScale); in calculateCroppedSrcRect() local 120 final int srcCroppedW = Math.round(dstW * scale); in calculateCroppedSrcRect() 121 final int srcCroppedH = Math.round(dstH * scale); in calculateCroppedSrcRect()
|
/frameworks/base/media/java/android/media/ |
D | ThumbnailUtils.java | 179 float scale = 512f / max; in createVideoThumbnail() local 180 int w = Math.round(scale * width); in createVideoThumbnail() 181 int h = Math.round(scale * height); in createVideoThumbnail() 219 float scale; in extractThumbnail() local 221 scale = width / (float) source.getWidth(); in extractThumbnail() 223 scale = height / (float) source.getHeight(); in extractThumbnail() 226 matrix.setScale(scale, scale); in extractThumbnail() 406 float scale = targetHeight / bitmapHeightF; in transform() local 407 if (scale < .9F || scale > 1F) { in transform() 408 scaler.setScale(scale, scale); in transform() [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/ |
D | GlifPatternDrawable.java | 162 float scale = Math.max(scaleX, scaleY); in createBitmapCache() local 163 scale = Math.min(MAX_CACHED_BITMAP_SCALE, scale); in createBitmapCache() 166 int scaledWidth = (int) (VIEWBOX_WIDTH * scale); in createBitmapCache() 167 int scaledHeight = (int) (VIEWBOX_HEIGHT * scale); in createBitmapCache() 175 renderOnCanvas(bitmapCanvas, scale); in createBitmapCache() 179 private void renderOnCanvas(Canvas canvas, float scale) { in renderOnCanvas() argument 181 canvas.scale(scale, scale); in renderOnCanvas() 266 canvas.scale(scaleX, scaleY); in scaleCanvasToBounds() 270 canvas.scale(scaleY / scaleX, 1f, SCALE_FOCUS_X * bitmapWidth, 0f); in scaleCanvasToBounds() 274 canvas.scale(1f, scaleX / scaleY, 0f, SCALE_FOCUS_Y * bitmapHeight); in scaleCanvasToBounds()
|
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/ |
D | Fisheye.java | 32 private float scale = 0.5f; field in Fisheye 59 scale = progress / 50.0f; in onBar1Changed() 72 scale = time % 2.f; in animateBars() 82 center_y, scale); in do_init() local 87 center_y, scale); in do_init() local 92 scale); in do_init() local 97 scale); in do_init() local
|
D | Resize.java | 35 float scale = 1.f / 32.f; in createTest() local 38 tb.setX((int)(mWidth * scale)); in createTest() 39 tb.setY((int)(mHeight * scale)); in createTest() 48 mScript.set_scale(1.f / scale); in createTest() 55 mScript.set_scale(scale); in createTest()
|
D | Vignette.java | 31 private float scale = 0.5f; field in Vignette 73 scale = progress / 50.0f; in onBar1Changed() 94 scale = time % 2.f; in animateBars() 104 center_y, scale, shade, slope); in do_init() local 109 center_y, scale, shade, slope); in do_init() local 114 scale, shade, slope); in do_init() local 119 scale, shade, slope); in do_init() local
|
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/views/ |
D | TiledImageView.java | 64 public 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 …]
|
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
D | RoundRectangle.java | 87 double scale = Math.min(1.0, width / topCornerWidth); in RoundRectangle() local 88 scale = Math.min(scale, width / bottomCornerWidth); in RoundRectangle() 89 scale = Math.min(scale, height / leftCornerHeight); in RoundRectangle() 90 scale = Math.min(scale, height / rightCornerHeight); in RoundRectangle() 92 this.ulWidth = dimensions[0] * scale; in RoundRectangle() 93 this.ulHeight = dimensions[1] * scale; in RoundRectangle() 94 this.urWidth = dimensions[2] * scale; in RoundRectangle() 95 this.urHeight = dimensions[3] * scale; in RoundRectangle() 96 this.lrWidth = dimensions[4] * scale; in RoundRectangle() 97 this.lrHeight = dimensions[5] * scale; in RoundRectangle() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | NinePatch.java | 48 opticalRect.scale(decodeScale); in InsetStruct() 66 public static Rect scaleInsets(int left, int top, int right, int bottom, float scale) { in scaleInsets() argument 67 if (scale == 1.0f) { in scaleInsets() 72 result.left = (int) Math.ceil(left * scale); in scaleInsets() 73 result.top = (int) Math.ceil(top * scale); in scaleInsets() 74 result.right = (int) Math.ceil(right * scale); in scaleInsets() 75 result.bottom = (int) Math.ceil(bottom * scale); in scaleInsets()
|
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/ |
D | Vignette.java | 31 private float scale = 0.5f; field in Vignette 73 scale = progress / 50.0f; in onBar1Changed() 94 scale = time % 2.f; in animateBars() 104 center_y, scale, shade, slope); in do_init() local 109 center_y, scale, shade, slope); in do_init() local 114 scale, shade, slope); in do_init() local 119 scale, shade, slope); in do_init() local
|
D | Fisheye.java | 35 private float scale = 0.5f; field in Fisheye 62 scale = progress / 50.0f; in onBar1Changed() 75 scale = time % 2.f; in animateBars() 85 center_y, scale); in do_init() local 90 center_y, scale); in do_init() local 95 scale); in do_init() local 100 scale); in do_init() local
|