Home
last modified time | relevance | path

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

12345678910>>...15

/frameworks/base/core/java/android/view/
DMagnificationSpec.java34 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/
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 …]
/frameworks/native/libs/input/
DVelocityControl.cpp72 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/accessibility/java/com/android/server/accessibility/
DMagnificationController.java179 return mCurrentMagnificationSpec.scale > 1.0f; in isMagnifying()
205 final float scale = sentSpec.scale; in onMagnificationRegionChanged() local
211 + mMagnificationBounds.left - offsetX) / scale; in onMagnificationRegionChanged()
213 + mMagnificationBounds.top - offsetY) / scale; in onMagnificationRegionChanged()
215 scale, centerX, centerY, false, INVALID_ID); in onMagnificationRegionChanged()
274 return mCurrentMagnificationSpec.scale; in getScale()
332 return mSpecAnimationBridge.mSentMagnificationSpec.scale; in getSentScale()
401 public boolean setScale(float scale, float pivotX, float pivotY, boolean animate, int id) { in setScale() argument
407 scale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in setScale()
412 final float oldScale = spec.scale; in setScale()
[all …]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/
DBitmapUtils.java97 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/media/mca/filterpacks/java/android/filterpacks/imageproc/
DVignetteFilter.java94 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()
DLomoishFilter.java153 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()
DDocumentaryFilter.java144 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()
DFisheyeFilter.java145 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()
DStraightenFilter.java138 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/
DCompatibilityInfo.java245 int dens, float scale, float invertedScale) { in CompatibilityInfo() argument
248 applicationScale = scale; in CompatibilityInfo()
311 rect.scale(applicationInvertedScale); in translateRectInScreenToAppWinFrame()
318 transparentRegion.scale(applicationScale); in translateRegionInWindowToScreen()
344 canvas.scale(applicationScale, applicationScale); in translateCanvas()
351 event.scale(applicationInvertedScale); in translateEventInScreenToAppWindow()
359 params.scale(applicationScale); in translateWindowLayout()
366 rect.scale(applicationScale); in translateRectInAppWindowToScreen()
373 rect.scale(applicationInvertedScale); in translateRectInScreenToAppWindow()
380 final float scale = applicationInvertedScale; in translatePointInScreenToAppWindow() local
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/
DTaskViewTransform.java55 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/
DVelocityControl.h37 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/base/media/java/android/media/
DThumbnailUtils.java179 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/
DGlifPatternDrawable.java161 float scale = Math.max(scaleX, scaleY); in createBitmapCache() local
162 scale = Math.min(MAX_CACHED_BITMAP_SCALE, scale); in createBitmapCache()
165 int scaledWidth = (int) (VIEWBOX_WIDTH * scale); in createBitmapCache()
166 int scaledHeight = (int) (VIEWBOX_HEIGHT * scale); in createBitmapCache()
174 renderOnCanvas(bitmapCanvas, scale); in createBitmapCache()
178 private void renderOnCanvas(Canvas canvas, float scale) { in renderOnCanvas() argument
180 canvas.scale(scale, scale); in renderOnCanvas()
265 canvas.scale(scaleX, scaleY); in scaleCanvasToBounds()
269 canvas.scale(scaleY / scaleX, 1f, SCALE_FOCUS_X * bitmapWidth, 0f); in scaleCanvasToBounds()
273 canvas.scale(1f, scaleX / scaleY, 0f, SCALE_FOCUS_Y * bitmapHeight); in scaleCanvasToBounds()
/frameworks/opt/bitmap/src/com/android/bitmap/util/
DBitmapUtils.java73 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/packages/WallpaperCropper/src/com/android/photos/views/
DTiledImageView.java64 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/
DRoundRectangle.java89 double scale = Math.min(1.0, width / topCornerWidth); in RoundRectangle() local
90 scale = Math.min(scale, width / bottomCornerWidth); in RoundRectangle()
91 scale = Math.min(scale, height / leftCornerHeight); in RoundRectangle()
92 scale = Math.min(scale, height / rightCornerHeight); in RoundRectangle()
94 this.ulWidth = dimensions[0] * scale; in RoundRectangle()
95 this.ulHeight = dimensions[1] * scale; in RoundRectangle()
96 this.urWidth = dimensions[2] * scale; in RoundRectangle()
97 this.urHeight = dimensions[3] * scale; in RoundRectangle()
98 this.lrWidth = dimensions[4] * scale; in RoundRectangle()
99 this.lrHeight = dimensions[5] * scale; in RoundRectangle()
[all …]
/frameworks/rs/java/tests/ImageProcessing2/src/com/android/rs/image/
DFisheye.java32 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
DVignette.java31 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
DResize.java35 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()
/frameworks/base/graphics/java/android/graphics/
DNinePatch.java48 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/java/tests/ImageProcessing_jb/src/com/android/rs/image/
DFisheye.java35 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
DVignette.java31 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/support/compat/java/android/support/v4/app/
DSharedElementCallback.java193 float scale = Math.min(1f, ((float)MAX_IMAGE_SIZE) / (bitmapWidth * bitmapHeight)); in onCaptureSharedElementSnapshot() local
194 bitmapWidth *= scale; in onCaptureSharedElementSnapshot()
195 bitmapHeight *= scale; in onCaptureSharedElementSnapshot()
201 mTempMatrix.postScale(scale, scale); in onCaptureSharedElementSnapshot()
219 float scale = Math.min(1f, ((float)MAX_IMAGE_SIZE) / (width * height)); in createDrawableBitmap() local
220 if (drawable instanceof BitmapDrawable && scale == 1f) { in createDrawableBitmap()
224 int bitmapWidth = (int) (width * scale); in createDrawableBitmap()
225 int bitmapHeight = (int) (height * scale); in createDrawableBitmap()

12345678910>>...15