Home
last modified time | relevance | path

Searched refs:radius (Results 1 – 25 of 213) sorted by relevance

123456789

/frameworks/base/libs/hwui/utils/
DBlur.cpp29 float Blur::convertRadiusToSigma(float radius) { in convertRadiusToSigma() argument
30 return radius > 0 ? BLUR_SIGMA_SCALE * radius + 0.5f : 0.0f; in convertRadiusToSigma()
40 uint32_t Blur::convertRadiusToInt(float radius) { in convertRadiusToInt() argument
41 const float radiusCeil = ceilf(radius); in convertRadiusToInt()
42 if (MathUtils::areEqual(radiusCeil, radius)) { in convertRadiusToInt()
45 return radius; in convertRadiusToInt()
57 static float legacyConvertRadiusToSigma(float radius) { in legacyConvertRadiusToSigma() argument
58 return radius > 0 ? 0.3f * radius + 0.6f : 0.0f; in legacyConvertRadiusToSigma()
61 void Blur::generateGaussianWeights(float* weights, float radius) { in generateGaussianWeights() argument
62 int32_t intRadius = convertRadiusToInt(radius); in generateGaussianWeights()
[all …]
DBlur.h29 static float convertRadiusToSigma(float radius);
35 static uint32_t convertRadiusToInt(float radius);
37 static void generateGaussianWeights(float* weights, float radius);
38 static void horizontal(float* weights, int32_t radius, const uint8_t* source, uint8_t* dest,
40 static void vertical(float* weights, int32_t radius, const uint8_t* source, uint8_t* dest,
/frameworks/rs/toolkit/test/
DReferenceBlur.kt33 radius: Int = 5, restriction: Range2d?): ByteArray { in <lambda>()
35 require (radius in 1..maxRadius) { in <lambda>()
36 "RenderScriptToolkit blur. Radius should be between 1 and $maxRadius. $radius provided." in <lambda>()
38 val gaussian = buildGaussian(radius) in <lambda>()
44 val scratch = horizontalBlur(inputInFloat, gaussian, radius, restriction) in <lambda>()
45 val outInFloat = verticalBlur(scratch, gaussian, radius, restriction) in <lambda>()
57 radius: Int, in horizontalBlur()
67 max(restriction.startY - radius, 0), in horizontalBlur()
68 min(restriction.endY + radius, input.sizeY) in horizontalBlur()
75 for ((gaussianIndex, delta: Int) in (-radius..radius).withIndex()) { in horizontalBlur()
[all …]
DReferenceConvolve.kt34 val radius = when (coefficients.size) { in <lambda>() constant
45 output[x, y] = convolveOne(input, x, y, coefficients, radius) in <lambda>()
56 radius: Int in convolveOne()
60 for (deltaY in -radius..radius) { in convolveOne()
61 for (deltaX in -radius..radius) { in convolveOne()
/frameworks/base/core/java/android/view/
DRoundedCorners.java194 int radius; in getRoundedCornerRadius() local
196 radius = array.getDimensionPixelSize(index, 0); in getRoundedCornerRadius()
198 radius = res.getDimensionPixelSize(R.dimen.rounded_corner_radius); in getRoundedCornerRadius()
204 if (radius == 0 && res.getConfiguration().isScreenRound()) { in getRoundedCornerRadius()
205 radius = res.getDisplayMetrics().widthPixels / 2; in getRoundedCornerRadius()
207 return radius; in getRoundedCornerRadius()
222 int radius; in getRoundedCornerTopRadius() local
224 radius = array.getDimensionPixelSize(index, 0); in getRoundedCornerTopRadius()
226 radius = res.getDimensionPixelSize(R.dimen.rounded_corner_radius_top); in getRoundedCornerTopRadius()
229 return radius; in getRoundedCornerTopRadius()
[all …]
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/
Dthreshold.rscript22 static int radius;
34 radius = rad;
40 // x is of the form [-radius .. 0 .. radius]
41 // and sigma varies with radius.
42 // Based on some experimental radius values and sigma's
43 // we approximately fit sigma = f(radius) as
44 // sigma = radius * 0.4 + 0.6
45 // The larger the radius gets, the more our gaussian blur
48 float sigma = 0.4f * (float)radius + 0.6f;
59 for (int r = -radius; r <= radius; r ++) {
[all …]
Dthreshold_half.rscript22 static int radius;
34 radius = rad;
40 // x is of the form [-radius .. 0 .. radius]
41 // and sigma varies with radius.
42 // Based on some experimental radius values and sigma's
43 // we approximately fit sigma = f(radius) as
44 // sigma = radius * 0.4 + 0.6
45 // The larger the radius gets, the more our gaussian blur
48 half sigma = 0.4f * (half)radius + 0.6f;
59 for (int r = -radius; r <= radius; r ++) {
[all …]
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/
Dthreshold.rscript22 static int radius;
34 radius = rad;
40 // x is of the form [-radius .. 0 .. radius]
41 // and sigma varies with radius.
42 // Based on some experimental radius values and sigma's
43 // we approximately fit sigma = f(radius) as
44 // sigma = radius * 0.4 + 0.6
45 // The larger the radius gets, the more our gaussian blur
48 float sigma = 0.4f * (float)radius + 0.6f;
59 for (int r = -radius; r <= radius; r ++) {
[all …]
/frameworks/rs/tests/java_api/ImageProcessing/src/com/android/rs/image/
Dthreshold.rscript22 static int radius;
34 radius = rad;
40 // x is of the form [-radius .. 0 .. radius]
41 // and sigma varies with radius.
42 // Based on some experimental radius values and sigma's
43 // we approximately fit sigma = f(radius) as
44 // sigma = radius * 0.4 + 0.6
45 // The larger the radius gets, the more our gaussian blur
48 float sigma = 0.4f * (float)radius + 0.6f;
59 for (int r = -radius; r <= radius; r ++) {
[all …]
/frameworks/base/graphics/java/android/graphics/drawable/
DPaintDrawable.java44 public void setCornerRadius(float radius) { in setCornerRadius() argument
46 if (radius > 0) { in setCornerRadius()
49 radii[i] = radius; in setCornerRadius()
78 int radius = a.getDimensionPixelSize( in inflateTag() local
80 setCornerRadius(radius); in inflateTag()
85 com.android.internal.R.styleable.DrawableCorners_topLeftRadius, radius); in inflateTag()
87 com.android.internal.R.styleable.DrawableCorners_topRightRadius, radius); in inflateTag()
89 com.android.internal.R.styleable.DrawableCorners_bottomLeftRadius, radius); in inflateTag()
91 com.android.internal.R.styleable.DrawableCorners_bottomRightRadius, radius); in inflateTag()
93 if (topLeftRadius != radius || topRightRadius != radius || in inflateTag()
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/landroid/
DVisibleUniverse.kt97 radius = container.radius, in ZoomedDrawScope()
121 radius = r in ZoomedDrawScope()
131 radius = pos.distance(orbitCenter), in ZoomedDrawScope()
143 drawCircle(color = Colors.Eigengrau, radius = radius, center = pos) in ZoomedDrawScope()
144 drawCircle(color = color, radius = radius, center = pos, style = Stroke(2f / zoom)) in ZoomedDrawScope()
150 drawCircle(color = star.color, radius = star.radius, center = Vec2.Zero) in drawStar()
158 radius1 = star.radius + 80, in drawStar()
159 radius2 = star.radius + 250, in drawStar()
166 pathEffect = PathEffect.cornerPathEffect(radius = 200f) in drawStar()
174 radius1 = star.radius + 20, in drawStar()
[all …]
DUniverse.kt52 radius: Float, in <lambda>()
64 this.radius = radius in <lambda>()
67 mass = 4 / 3 * PIf * radius.pow(3) * PLANETARY_DENSITY in <lambda>()
107 class Star(val cls: StarClass, radius: Float) :
108 Planet(orbitCenter = Vec2.Zero, radius = radius, pos = Vec2.Zero, speed = 0f) {
111 mass = 4 / 3 * PIf * radius.pow(3) * STELLAR_DENSITY
134 radius = STAR_RADIUS_RANGE.endInclusive, in initTest()
140 val radius = in initTest() constant
151 radius = radius, in initTest()
159 p.atmosphere = "radius=$radius" in initTest()
[all …]
DPathTools.kt24 fun createPolygon(radius: Float, sides: Int): Path { in <lambda>()
26 moveTo(radius, 0f) in <lambda>()
29 lineTo(radius * cos(angleStep * i), radius * sin(angleStep * i)) in <lambda>()
35 fun createPolygonPoints(radius: Float, sides: Int): List<Vec2> { in createPolygonPoints()
38 Vec2(radius * cos(angleStep * i), radius * sin(angleStep * i)) in createPolygonPoints()
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/
DMenuViewAppearance.java234 final float radius = getMenuRadius(mTargetFeaturesSize); in getMenuMovingStateRadii() local
235 return new float[]{radius, radius, radius, radius, radius, radius, radius, radius}; in getMenuMovingStateRadii()
272 private static float[] createRadii(boolean isMenuOnLeftSide, float radius) { in createRadii() argument
274 ? new float[]{0.0f, 0.0f, radius, radius, radius, radius, 0.0f, 0.0f} in createRadii()
275 : new float[]{radius, radius, 0.0f, 0.0f, 0.0f, 0.0f, radius, radius}; in createRadii()
/frameworks/base/core/tests/coretests/src/android/view/
DRoundedCornersTest.java82 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testGetRoundedCorner() local
83 RoundedCorners roundedCorners = RoundedCorners.fromRadii(radius, 200, 400); in testGetRoundedCorner()
165 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testRotateRoundedCorners_90() local
166 RoundedCorners roundedCorners = RoundedCorners.fromRadii(radius, 200, 400) in testRotateRoundedCorners_90()
181 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testRotateRoundedCorners_270() local
182 RoundedCorners roundedCorners = RoundedCorners.fromRadii(radius, 200, 400) in testRotateRoundedCorners_270()
197 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testFromRadius_cache() local
198 RoundedCorners cached = RoundedCorners.fromRadii(radius, 200, 400); in testFromRadius_cache()
200 assertThat(RoundedCorners.fromRadii(radius, 200, 400), sameInstance(cached)); in testFromRadius_cache()
205 final Pair<Integer, Integer> radius = new Pair<>(10, 20); in testFromRadius_wontCacheIfRadiusChanged() local
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/assist/ui/
DDisplayUtils.java87 int radius = context.getResources().getDimensionPixelSize( in getCornerRadiusBottom() local
90 if (radius == 0) { in getCornerRadiusBottom()
91 radius = getCornerRadiusDefault(context); in getCornerRadiusBottom()
94 return radius; in getCornerRadiusBottom()
102 int radius = context.getResources().getDimensionPixelSize( in getCornerRadiusTop() local
105 if (radius == 0) { in getCornerRadiusTop()
106 radius = getCornerRadiusDefault(context); in getCornerRadiusTop()
109 return radius; in getCornerRadiusTop()
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/
DShadowGenerator.java133 public float radius; field in ShadowGenerator.Builder
155 radius = r; in createPill()
158 int centerY = Math.round(radius + shadowBlur + keyShadowDistance); in createPill()
175 c.drawRoundRect(bounds, radius, radius, p); in drawShadow()
180 c.drawRoundRect(bounds, radius, radius, p); in drawShadow()
188 c.drawRoundRect(bounds, radius, radius, p); in drawShadow()
192 c.drawRoundRect(bounds, radius, radius, p); in drawShadow()
/frameworks/base/packages/SystemUI/src/com/android/systemui/scrim/
DScrimDrawable.java150 public void setRoundedCorners(float radius) { in setRoundedCorners() argument
151 if (radius == mCornerRadius) { in setRoundedCorners()
154 mCornerRadius = radius; in setRoundedCorners()
156 mConcaveInfo.setCornerRadius(radius); in setRoundedCorners()
205 public void setBottomEdgeRadius(float radius) { in setBottomEdgeRadius() argument
206 if (mBottomEdgeRadius != radius) { in setBottomEdgeRadius()
207 mBottomEdgeRadius = radius; in setBottomEdgeRadius()
301 public void setCornerRadius(float radius) { in setCornerRadius() argument
302 mPathOverlap = radius; in setCornerRadius()
303 mCornerRadii[0] = radius; in setCornerRadius()
[all …]
/frameworks/native/services/surfaceflinger/FrontEnd/
DLayerSnapshot.h31 RoundedCornerState(const FloatRect& cropRect, const vec2& radius) in RoundedCornerState()
32 : cropRect(cropRect), radius(radius) {} in RoundedCornerState()
37 vec2 radius; member
38 bool hasRoundedCorners() const { return radius.x > 0.0f && radius.y > 0.0f; } in hasRoundedCorners()
40 return cropRect == rhs.cropRect && radius == rhs.radius;
/frameworks/base/libs/hwui/jni/
DMaskFilter.cpp16 static float convertRadiusToSigma(float radius) { in convertRadiusToSigma() argument
17 return radius > 0 ? kBLUR_SIGMA_SCALE * radius + 0.5f : 0.0f; in convertRadiusToSigma()
27 static jlong createBlur(JNIEnv* env, jobject, jfloat radius, jint blurStyle) { in createBlur() argument
28 SkScalar sigma = convertRadiusToSigma(radius); in createBlur()
34 …mboss(JNIEnv* env, jobject, jfloatArray dirArray, jfloat ambient, jfloat specular, jfloat radius) { in createEmboss() argument
43 SkScalar sigma = convertRadiusToSigma(radius); in createEmboss()
/frameworks/base/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/
DGlowingCard.kt33 val radius: Float constant in com.android.test.silkfx.hdr.GlowingCard
37 radius = 10.dp()
66 canvas.drawRoundRect(rect, radius, radius, paint) in onDraw()
74 canvas.drawRoundRect(rect, radius, radius, paint) in onDraw()
/frameworks/base/libs/hwui/
DOutline.h33 void setRoundRect(int left, int top, int right, int bottom, float radius, float alpha) { in setRoundRect() argument
36 top == mBounds.top && bottom == mBounds.bottom && radius == mRadius) { in setRoundRect()
43 mRadius = radius; in setRoundRect()
53 if (MathUtils::isPositive(radius)) { in setRoundRect()
54 mPath.addRoundRect(SkRect::MakeLTRB(left, top, right, bottom), radius, radius); in setRoundRect()
/frameworks/base/graphics/java/android/graphics/
DRadialGradient.java70 public RadialGradient(float centerX, float centerY, float radius, in RadialGradient() argument
73 this(centerX, centerY, 0f, centerX, centerY, radius, convertColors(colors), in RadialGradient()
94 public RadialGradient(float centerX, float centerY, float radius, in RadialGradient() argument
97 this(centerX, centerY, 0f, centerX, centerY, radius, colors.clone(), stops, in RadialGradient()
189 public RadialGradient(float centerX, float centerY, float radius, in RadialGradient() argument
191 this(centerX, centerY, radius, Color.pack(centerColor), Color.pack(edgeColor), tileMode); in RadialGradient()
207 public RadialGradient(float centerX, float centerY, float radius, in RadialGradient() argument
209 this(centerX, centerY, radius, new long[] {centerColor, edgeColor}, null, tileMode); in RadialGradient()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DBlurUtils.kt79 fun prepareBlur(viewRootImpl: ViewRootImpl?, radius: Int) { in prepareBlur()
85 if (lastAppliedBlur == 0 && radius != 0) { in prepareBlur()
103 fun applyBlur(viewRootImpl: ViewRootImpl?, radius: Int, opaque: Boolean) { in applyBlur()
109 it.setBackgroundBlurRadius(viewRootImpl.surfaceControl, radius) in applyBlur()
110 if (!earlyWakeupEnabled && lastAppliedBlur == 0 && radius != 0) { in applyBlur()
120 if (earlyWakeupEnabled && lastAppliedBlur != 0 && radius == 0) { in applyBlur()
125 lastAppliedBlur = radius in applyBlur()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DBlurUtilsTest.kt69 val radius = 10 in testApplyBlur_success() constant
74 blurUtils.applyBlur(viewRootImpl, radius, true /* opaque */) in testApplyBlur_success()
75 verify(transaction).setBackgroundBlurRadius(eq(surfaceControl), eq(radius)) in testApplyBlur_success()
82 val radius = 10 in testApplyBlur_blurDisabled() constant
89 blurUtils.applyBlur(viewRootImpl, radius, true /* opaque */) in testApplyBlur_blurDisabled()
97 val radius = 10 in testEarlyWakeUp() constant
102 blurUtils.applyBlur(viewRootImpl, radius, true /* opaque */) in testEarlyWakeUp()

123456789