Home
last modified time | relevance | path

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

12345678910>>...70

/frameworks/libs/systemui/toruslib/torus-math/src/main/java/com/google/android/torus/math/
DAffineTransform.kt29 val scale: Vector3 = Vector3(1f, 1f, 1f) constant in com.google.android.torus.math.AffineTransform
34 transform.scale
47 return AffineTransform(Vector3(x, y, z), rotation, scale) in withTranslation()
70 fun withScale(scale: Float): AffineTransform { in withScale()
71 return withScale(scale, scale, scale) in withScale()
82 return AffineTransform(position, RotationQuaternion(rotation), scale) in withRotation()
93 return AffineTransform(position, RotationQuaternion.fromEuler(x, y, z), scale) in withEulerRotation()
97 return AffineTransform(position + Vector3(x, y, z), rotation, scale) in translateBy()
100 fun scaleBy(scale: Float): AffineTransform { in scaleBy()
101 return AffineTransform(position, rotation, this.scale + Vector3(scale)) in scaleBy()
[all …]
DSphericalTransform.kt64 val scale: Vector3 = Vector3(1f, 1f, 1f) constant in com.google.android.torus.math.SphericalTransform
73 transform.scale
88 return SphericalTransform(azimuth, elevation, roll, center, distance, scale) in withAzimuth()
100 return SphericalTransform(azimuth, elevation, roll, center, distance, scale) in withElevation()
111 return SphericalTransform(azimuth, elevation, roll, center, distance, scale) in withRoll()
122 return SphericalTransform(azimuth, elevation, roll, center, distance, scale) in withCenter()
135 return SphericalTransform(azimuth, elevation, roll, Vector3(x, y, z), distance, scale) in withCenter()
146 return SphericalTransform(azimuth, elevation, roll, center, distance, scale) in withDistance()
169 fun withScale(scale: Float): SphericalTransform { in withScale()
170 return withScale(scale, scale, scale) in withScale()
[all …]
/frameworks/base/core/java/android/view/
DMagnificationSpec.java31 public float scale = 1.0f; field in MagnificationSpec
45 public void initialize(float scale, float offsetX, float offsetY) { in initialize() argument
46 if (scale < 1) { in initialize()
49 this.scale = scale; in initialize()
55 return scale == 1.0f && offsetX == 0 && offsetY == 0; in isNop()
59 scale = 1.0f; in clear()
65 scale = other.scale; in setTo()
77 parcel.writeFloat(scale); in writeToParcel()
93 return scale == s.scale && offsetX == s.offsetX && offsetY == s.offsetY; in equals()
98 int result = (scale != +0.0f ? Float.floatToIntBits(scale) : 0); in hashCode()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/
DPipSurfaceTransactionHelper.java82 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
85 return scale(tx, leash, sourceBounds, mTmpDestinationRectF, 0 /* degrees */); in scale()
92 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
94 return scale(tx, leash, sourceBounds, destinationBounds, 0 /* degrees */); in scale()
101 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
104 return scale(tx, leash, sourceBounds, mTmpDestinationRectF, degrees); in scale()
111 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
140 final float scale, left, top; in scaleAndCrop() local
150 scale = (1 - fraction) * startScale + fraction * endScale; in scaleAndCrop()
151 left = destinationBounds.left - insets.left * scale; in scaleAndCrop()
[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/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/
DPipSurfaceTransactionHelper.java82 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
85 return scale(tx, leash, sourceBounds, mTmpDestinationRectF, 0 /* degrees */); in scale()
92 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
94 return scale(tx, leash, sourceBounds, destinationBounds, 0 /* degrees */); in scale()
101 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
104 return scale(tx, leash, sourceBounds, mTmpDestinationRectF, degrees); in scale()
111 public PipSurfaceTransactionHelper scale(SurfaceControl.Transaction tx, SurfaceControl leash, in scale() method in PipSurfaceTransactionHelper
140 final float scale; in scaleAndCrop() local
150 scale = (1 - fraction) * startScale + fraction * endScale; in scaleAndCrop()
152 scale = Math.max((float) destinationBounds.width() / sourceBounds.width(), in scaleAndCrop()
[all …]
/frameworks/base/graphics/java/android/graphics/drawable/
DRippleShader.java165 final float scale = 1.5f; in setNoisePhase() local
167 (float) (scale * 0.5 + (turbulencePhase * 0.01 * Math.cos(scale * 0.55))), in setNoisePhase()
168 (float) (scale * 0.5 + (turbulencePhase * 0.01 * Math.sin(scale * 0.55)))); in setNoisePhase()
170 (float) (scale * 0.2 + (turbulencePhase * -0.0066 * Math.cos(scale * 0.45))), in setNoisePhase()
171 (float) (scale * 0.2 + (turbulencePhase * -0.0066 * Math.sin(scale * 0.45)))); in setNoisePhase()
173 (float) (scale + (turbulencePhase * -0.0066 * Math.cos(scale * 0.35))), in setNoisePhase()
174 (float) (scale + (turbulencePhase * -0.0066 * Math.sin(scale * 0.35)))); in setNoisePhase()
/frameworks/base/core/tests/vibrator/src/android/os/vibrator/
DPrimitiveSegmentTest.java94 assertEquals(1f, initial.scale(1).getScale(), TOLERANCE); in testScale_fullPrimitiveScaleValue()
95 assertEquals(0.34f, initial.scale(0.5f).getScale(), TOLERANCE); in testScale_fullPrimitiveScaleValue()
97 assertEquals(1f, initial.scale(1.5f).getScale(), TOLERANCE); in testScale_fullPrimitiveScaleValue()
98 assertEquals(0.53f, initial.scale(1.5f).scale(2 / 3f).getScale(), TOLERANCE); in testScale_fullPrimitiveScaleValue()
100 assertEquals(0.71f, initial.scale(0.8f).getScale(), TOLERANCE); in testScale_fullPrimitiveScaleValue()
101 assertEquals(0.84f, initial.scale(0.8f).scale(1.25f).getScale(), TOLERANCE); in testScale_fullPrimitiveScaleValue()
109 assertEquals(0.5f, initial.scale(1).getScale(), TOLERANCE); in testScale_halfPrimitiveScaleValue()
110 assertEquals(0.17f, initial.scale(0.5f).getScale(), TOLERANCE); in testScale_halfPrimitiveScaleValue()
112 assertEquals(0.86f, initial.scale(1.5f).getScale(), TOLERANCE); in testScale_halfPrimitiveScaleValue()
113 assertEquals(0.47f, initial.scale(1.5f).scale(2 / 3f).getScale(), TOLERANCE); in testScale_halfPrimitiveScaleValue()
[all …]
DStepSegmentTest.java99 assertEquals(1f, initial.scale(1).getAmplitude(), TOLERANCE); in testScale_fullAmplitude()
100 assertEquals(0.34f, initial.scale(0.5f).getAmplitude(), TOLERANCE); in testScale_fullAmplitude()
102 assertEquals(1f, initial.scale(1.5f).getAmplitude(), TOLERANCE); in testScale_fullAmplitude()
103 assertEquals(0.53f, initial.scale(1.5f).scale(2 / 3f).getAmplitude(), TOLERANCE); in testScale_fullAmplitude()
105 assertEquals(0.71f, initial.scale(0.8f).getAmplitude(), TOLERANCE); in testScale_fullAmplitude()
106 assertEquals(0.84f, initial.scale(0.8f).scale(1.25f).getAmplitude(), TOLERANCE); in testScale_fullAmplitude()
113 assertEquals(0.5f, initial.scale(1).getAmplitude(), TOLERANCE); in testScale_halfAmplitude()
114 assertEquals(0.17f, initial.scale(0.5f).getAmplitude(), TOLERANCE); in testScale_halfAmplitude()
116 assertEquals(0.86f, initial.scale(1.5f).getAmplitude(), TOLERANCE); in testScale_halfAmplitude()
117 assertEquals(0.47f, initial.scale(1.5f).scale(2 / 3f).getAmplitude(), TOLERANCE); in testScale_halfAmplitude()
[all …]
DRampSegmentTest.java103 assertEquals(0f, initial.scale(1).getStartAmplitude(), TOLERANCE); in testScale()
104 assertEquals(0f, initial.scale(0.5f).getStartAmplitude(), TOLERANCE); in testScale()
105 assertEquals(0f, initial.scale(1.5f).getStartAmplitude(), TOLERANCE); in testScale()
106 assertEquals(0f, initial.scale(1.5f).scale(2 / 3f).getStartAmplitude(), TOLERANCE); in testScale()
107 assertEquals(0f, initial.scale(0.8f).scale(1.25f).getStartAmplitude(), TOLERANCE); in testScale()
109 assertEquals(1f, initial.scale(1).getEndAmplitude(), TOLERANCE); in testScale()
110 assertEquals(0.34f, initial.scale(0.5f).getEndAmplitude(), TOLERANCE); in testScale()
112 assertEquals(1f, initial.scale(1.5f).getEndAmplitude(), TOLERANCE); in testScale()
113 assertEquals(0.53f, initial.scale(1.5f).scale(2 / 3f).getEndAmplitude(), TOLERANCE); in testScale()
115 assertEquals(0.71f, initial.scale(0.8f).getEndAmplitude(), TOLERANCE); in testScale()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/pip/
DPipSurfaceTransactionHelper.java45 public PictureInPictureSurfaceTransaction scale( in scale() method in PipSurfaceTransactionHelper
63 public PictureInPictureSurfaceTransaction scale( in scale() method in PipSurfaceTransactionHelper
90 final float scale, left, top; in scaleAndCrop() local
92 scale = Math.max((float) destinationBounds.width() / sourceBounds.width(), in scaleAndCrop()
95 left = scale == 1 in scaleAndCrop()
96 ? 0 : destinationBounds.left - (insets.left + sourceBounds.left) * scale; in scaleAndCrop()
97 top = scale == 1 in scaleAndCrop()
98 ? 0 : destinationBounds.top - (insets.top + sourceBounds.top) * scale; in scaleAndCrop()
107 scale = Math.min((1 - progress) * startScale + progress * endScale, 1.0f); in scaleAndCrop()
108 left = destinationBounds.left - (insets.left + sourceBounds.left) * scale; in scaleAndCrop()
[all …]
/frameworks/base/tools/fonts/
Dfont-scaling-array-generator.js94 function generateRatios(scale) { argument
105 if (scale < parseFloat(startTargetScaleKey, 10)) {
114 const interpolationProgress = map(scale, startTargetScale, endTargetScale, 0, 1);
126 if (scale < 1) {
129 coeff2 = scale;
132 coeff1 = map(scale, 1, 2, 2, 8);
139 newSizeDp = originalSizeDp * scale;
153 .map(scale => {
154 const scaleString = (scale * 100).toFixed(0);
156 scale,
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/util/
DMediaDataUtilsTest.kt36 val scale = MediaDataUtils.getScaleFactor(input, target) in testScaleFactor_zeroInput_returnsZero() constant
37 assertThat(scale).isEqualTo(0f) in testScaleFactor_zeroInput_returnsZero()
45 val scale = MediaDataUtils.getScaleFactor(input, target) in testScaleFactor_tooWide_scaleDown() constant
46 assertThat(scale).isEqualTo(0.5f) in testScaleFactor_tooWide_scaleDown()
54 val scale = MediaDataUtils.getScaleFactor(input, target) in testScaleFactor_tooTall_scaleDown() constant
55 assertThat(scale).isEqualTo(0.5f) in testScaleFactor_tooTall_scaleDown()
63 val scale = MediaDataUtils.getScaleFactor(input, target) in testScaleFactor_lessWide_scaleUp() constant
64 assertThat(scale).isEqualTo(2f) in testScaleFactor_lessWide_scaleUp()
72 val scale = MediaDataUtils.getScaleFactor(input, target) in testScaleFactor_lessTall_scaleUp() constant
73 assertThat(scale).isEqualTo(2f) in testScaleFactor_lessTall_scaleUp()
/frameworks/native/libs/vibrator/
DExternalVibrationUtils.cpp59 void applyHapticScale(float* buffer, size_t length, HapticScale scale) { in applyHapticScale() argument
60 if (scale.isScaleMute()) { in applyHapticScale()
64 if (scale.isScaleNone()) { in applyHapticScale()
67 HapticLevel hapticLevel = scale.getLevel(); in applyHapticScale()
68 float adaptiveScaleFactor = scale.getAdaptiveScaleFactor(); in applyHapticScale()
100 bool isValidHapticScale(HapticScale scale) { in isValidHapticScale() argument
101 switch (scale.getLevel()) { in isValidHapticScale()
113 void scaleHapticData(float* buffer, size_t length, HapticScale scale, float limit) { in scaleHapticData() argument
114 if (isValidHapticScale(scale)) { in scaleHapticData()
115 applyHapticScale(buffer, length, scale); in scaleHapticData()
/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/libs/binary_translation/backend/testing/include/x86_64/
Dmem_operand.h41 template <MachineMemOperandScale scale>
46 static_assert(scale != MachineMemOperandScale::kOne, "ScaleOne not allowed"); in MakeIndexDisp()
47 return MemOperand(kAddrModeIndexDisp, kInvalidMachineReg, index, scale, disp); in MakeIndexDisp()
50 template <MachineMemOperandScale scale>
52 return MemOperand(kAddrModeBaseIndexDisp, base, index, scale, disp); in MakeBaseIndexDisp()
67 MachineMemOperandScale scale() const { in scale() function
87 MachineMemOperandScale scale, in MemOperand() argument
89 : addr_mode_(addr_mode), base_(base), index_(index), scale_(scale), disp_(disp) {} in MemOperand()
108 args..., mem_operand.index(), mem_operand.scale(), mem_operand.disp()); in GenArgsMem()
114 mem_operand.scale(), in GenArgsMem()
[all …]
/frameworks/av/media/libaaudio/src/flowgraph/
DFlowgraphUtilities.h38 static const float scale = (float)(1UL << 31); in clamp32FromFloat() local
47 f *= scale; in clamp32FromFloat()
64 static const float scale = 1 << 23; in clamp24FromFloat() local
65 return (int32_t) lroundf(fmaxf(fminf(f * scale, scale - 1.f), -scale)); in clamp24FromFloat()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
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()
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()
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()
DFisheyeFilter.java149 float scale[] = new float[2]; in updateProgramParams() local
151 scale[0] = 1f; in updateProgramParams()
152 scale[1] = ((float) mHeight) / mWidth; in updateProgramParams()
154 scale[0] = ((float) mWidth) / mHeight; in updateProgramParams()
155 scale[1] = 1f; in updateProgramParams()
158 float bound2 = 0.25f * (scale[0] * scale[0] + scale[1] * scale[1]); in updateProgramParams()
166 mProgram.setHostValue("scale", scale); in updateProgramParams()
/frameworks/native/libs/input/
DVelocityControl.cpp84 float scale = mParameters.scale; in scaleDeltas() local
86 float speed = hypotf(*vx, *vy) * scale; in scaleDeltas()
89 scale *= mParameters.acceleration; in scaleDeltas()
93 scale *= 1 + in scaleDeltas()
102 mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold, in scaleDeltas()
103 mParameters.acceleration, *vx, *vy, speed, scale / mParameters.scale); in scaleDeltas()
108 mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold, in scaleDeltas()
113 *deltaX *= scale; in scaleDeltas()
116 *deltaY *= scale; in scaleDeltas()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/animation/back/
DBackAnimationSpecTest.kt37 expected = BackTransformation(translateX = 0f, translateY = 0f, scale = 1f), in sysUi_floatingSystemSurfaces_animationValues()
42 expected = BackTransformation(translateX = -maxX, translateY = 0f, scale = minScale), in sysUi_floatingSystemSurfaces_animationValues()
47 expected = BackTransformation(translateX = maxX, translateY = 0f, scale = minScale), in sysUi_floatingSystemSurfaces_animationValues()
52 expected = BackTransformation(translateX = -maxX, translateY = -maxY, scale = minScale), in sysUi_floatingSystemSurfaces_animationValues()
57 expected = BackTransformation(translateX = 0f, translateY = -maxY, scale = 1f), in sysUi_floatingSystemSurfaces_animationValues()
62 expected = BackTransformation(translateX = 0f, translateY = maxY, scale = 1f), in sysUi_floatingSystemSurfaces_animationValues()
79 scale = 1f, in sysUi_bottomsheet_animationValues()
90 scale = minScale, in sysUi_bottomsheet_animationValues()
101 scale = minScale, in sysUi_bottomsheet_animationValues()
112 scale = minScale, in sysUi_bottomsheet_animationValues()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ui/
DTransitioningIconDrawable.kt79 val scale = in draw() constant
85 drawScaledDrawable(it, canvas, scale) in draw()
88 val scale = transitionAnimator.animatedFraction in draw() constant
89 drawScaledDrawable(it, canvas, scale) in draw()
97 private fun drawScaledDrawable(drawable: Drawable, canvas: Canvas, scale: Float) { in drawScaledDrawable()
100 canvas.scale( in drawScaledDrawable()
101 scale, in drawScaledDrawable()
102 scale, in drawScaledDrawable()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/
DFullScreenMagnificationControllerTest.java306 final float scale = 2.0f;
309 .setScale(TEST_DISPLAY, scale, center.x, center.y, false, SERVICE_ID_1));
323 final float scale = 2.0f;
325 final PointF offsets = computeOffsets(INITIAL_MAGNIFICATION_BOUNDS, center, scale);
327 .setScale(displayId, scale, center.x, center.y, false, SERVICE_ID_1));
330 final MagnificationSpec expectedSpec = getMagnificationSpec(scale, offsets);
350 float scale = 2.0f;
353 .setScale(displayId, scale, pivotPoint.x, pivotPoint.y, true, SERVICE_ID_1));
359 PointF offsets = computeOffsets(INITIAL_MAGNIFICATION_BOUNDS, newCenter, scale);
360 MagnificationSpec endSpec = getMagnificationSpec(scale, offsets);
[all …]

12345678910>>...70