/frameworks/base/core/java/com/android/internal/policy/ |
D | DockedDividerUtils.java | 62 public static void sanitizeStackBounds(Rect bounds, boolean topLeft) { in sanitizeStackBounds() argument 68 if (bounds.left >= bounds.right) { in sanitizeStackBounds() 69 bounds.left = bounds.right - 1; in sanitizeStackBounds() 71 if (bounds.top >= bounds.bottom) { in sanitizeStackBounds() 72 bounds.top = bounds.bottom - 1; in sanitizeStackBounds() 75 if (bounds.right <= bounds.left) { in sanitizeStackBounds() 76 bounds.right = bounds.left + 1; in sanitizeStackBounds() 78 if (bounds.bottom <= bounds.top) { in sanitizeStackBounds() 79 bounds.bottom = bounds.top + 1; in sanitizeStackBounds() 84 public static int calculatePositionForBounds(Rect bounds, int dockSide, int dividerSize) { in calculatePositionForBounds() argument [all …]
|
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/graphics/ |
D | CompositeDrawableTest.java | 53 Rect bounds = new Rect(0, 0, WIDTH, HEIGHT); in updateBounds_noBoundsRule() local 55 parentDrawable.updateBounds(bounds); in updateBounds_noBoundsRule() 58 assertEquals(bounds, adjustedBounds); in updateBounds_noBoundsRule() 67 Rect bounds = new Rect(0, 0, WIDTH, HEIGHT); in updateBounds_withBoundsRule() local 68 assertEquals(HEIGHT, bounds.height()); in updateBounds_withBoundsRule() 69 assertEquals(WIDTH, bounds.width()); in updateBounds_withBoundsRule() 75 parentDrawable.updateBounds(bounds); in updateBounds_withBoundsRule() 78 Rect expectedBounds = new Rect(bounds); in updateBounds_withBoundsRule() 79 expectedBounds.bottom = bounds.top + (int) (HEIGHT * fraction); in updateBounds_withBoundsRule() 83 drawable.setBounds(bounds); in updateBounds_withBoundsRule() [all …]
|
/frameworks/support/cardview/src/main/java/androidx/cardview/widget/ |
D | CardViewBaseImpl.java | 39 public void drawRoundRect(Canvas canvas, RectF bounds, float cornerRadius, in initStatic() 42 final float innerWidth = bounds.width() - twoRadius - 1; in initStatic() 43 final float innerHeight = bounds.height() - twoRadius - 1; in initStatic() 50 canvas.translate(bounds.left + roundedCornerRadius, in initStatic() 51 bounds.top + roundedCornerRadius); in initStatic() 64 canvas.drawRect(bounds.left + roundedCornerRadius - 1f, bounds.top, in initStatic() 65 bounds.right - roundedCornerRadius + 1f, in initStatic() 66 bounds.top + roundedCornerRadius, paint); in initStatic() 68 canvas.drawRect(bounds.left + roundedCornerRadius - 1f, in initStatic() 69 bounds.bottom - roundedCornerRadius, in initStatic() [all …]
|
D | RoundRectDrawable.java | 104 private void updateBounds(Rect bounds) { in updateBounds() argument 105 if (bounds == null) { in updateBounds() 106 bounds = getBounds(); in updateBounds() 108 mBoundsF.set(bounds.left, bounds.top, bounds.right, bounds.bottom); in updateBounds() 109 mBoundsI.set(bounds); in updateBounds() 120 protected void onBoundsChange(Rect bounds) { in onBoundsChange() argument 121 super.onBoundsChange(bounds); in onBoundsChange() 122 updateBounds(bounds); in onBoundsChange()
|
/frameworks/base/core/java/android/view/animation/ |
D | Transformation.java | 126 Rect bounds = t.getClipRect(); in compose() local 128 setClipRect(mClipRect.left + bounds.left, mClipRect.top + bounds.top, in compose() 129 mClipRect.right + bounds.right, mClipRect.bottom + bounds.bottom); in compose() 131 setClipRect(bounds); in compose() 145 Rect bounds = t.getClipRect(); in postCompose() local 147 setClipRect(mClipRect.left + bounds.left, mClipRect.top + bounds.top, in postCompose() 148 mClipRect.right + bounds.right, mClipRect.bottom + bounds.bottom); in postCompose() 150 setClipRect(bounds); in postCompose()
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | SaveLayer2Animation.cpp | 37 SkIRect bounds = SkIRect::MakeWH(width, height); in createContent() local 39 int smallRectHeight = (bounds.height() / regions); in createContent() 41 int top = bounds.fTop; in createContent() 50 canvas.saveLayer(bounds.fLeft, top, bounds.fRight, top + padding, &mBluePaint, in createContent() 55 TestUtils::drawUtf8ToCanvas(&canvas, offscreen.c_str(), mBluePaint, bounds.fLeft, in createContent() 59 canvas.drawRect(bounds.fLeft, top + padding, bounds.fRight, in createContent() 62 TestUtils::drawUtf8ToCanvas(&canvas, onscreen.c_str(), mGreenPaint, bounds.fLeft, in createContent()
|
/frameworks/base/libs/hwui/hwui/ |
D | Canvas.cpp | 95 float y, minikin::MinikinRect& bounds, float totalAdvance) in DrawTextFunctor() argument 101 , bounds(bounds) in DrawTextFunctor() 133 canvas->drawGlyphs(glyphFunc, glyphCount, outlinePaint, x, y, bounds.mLeft, bounds.mTop, in operator ()() 134 bounds.mRight, bounds.mBottom, totalAdvance); in operator ()() 140 canvas->drawGlyphs(glyphFunc, glyphCount, innerPaint, x, y, bounds.mLeft, bounds.mTop, in operator ()() 141 bounds.mRight, bounds.mBottom, totalAdvance); in operator ()() 144 canvas->drawGlyphs(glyphFunc, glyphCount, paint, x, y, bounds.mLeft, bounds.mTop, in operator ()() 145 bounds.mRight, bounds.mBottom, totalAdvance); in operator ()() 155 minikin::MinikinRect& bounds; member in android::DrawTextFunctor 171 minikin::MinikinRect bounds; in drawText() local [all …]
|
/frameworks/base/core/java/android/view/ |
D | DisplayCutout.java | 119 private DisplayCutout(Rect safeInsets, Region bounds, boolean copyArguments) { in DisplayCutout() argument 122 mBounds = bounds == null ? Region.obtain() : in DisplayCutout() 123 (copyArguments ? Region.obtain(bounds) : bounds); in DisplayCutout() 210 Region bounds = Region.obtain(); in getBoundingRects() local 212 bounds.set(mBounds); in getBoundingRects() 213 bounds.op(0, 0, Integer.MAX_VALUE, getSafeInsetTop(), Region.Op.INTERSECT); in getBoundingRects() 214 if (!bounds.isEmpty()) { in getBoundingRects() 215 result.add(bounds.getBounds()); in getBoundingRects() 218 bounds.set(mBounds); in getBoundingRects() 219 bounds.op(0, 0, getSafeInsetLeft(), Integer.MAX_VALUE, Region.Op.INTERSECT); in getBoundingRects() [all …]
|
/frameworks/support/wear/src/main/java/androidx/wear/widget/ |
D | RoundedDrawable.java | 190 protected void onBoundsChange(Rect bounds) { in onBoundsChange() argument 191 mTmpBounds.right = bounds.width(); in onBoundsChange() 192 mTmpBounds.bottom = bounds.height(); in onBoundsChange() 193 mTmpBoundsF.right = bounds.width(); in onBoundsChange() 194 mTmpBoundsF.bottom = bounds.height(); in onBoundsChange() 200 Rect bounds = getBounds(); in draw() local 201 if (mDrawable == null || bounds.isEmpty()) { in draw() 205 canvas.translate(bounds.left, bounds.top); in draw() 219 int minEdge = Math.min(bounds.width(), bounds.height()); in draw() 278 Rect bounds = getBounds(); in updateBitmapShader() local [all …]
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | ConfigurationContainer.java | 186 public boolean equivalentOverrideBounds(Rect bounds) { in equivalentOverrideBounds() argument 187 return equivalentBounds(getOverrideBounds(), bounds); in equivalentOverrideBounds() 193 public static boolean equivalentBounds(Rect bounds, Rect other) { in equivalentBounds() argument 194 return bounds == other in equivalentBounds() 195 || (bounds != null && (bounds.equals(other) || (bounds.isEmpty() && other == null))) in equivalentBounds() 196 || (other != null && other.isEmpty() && bounds == null); in equivalentBounds() 247 public int setBounds(Rect bounds) { in setBounds() argument 248 int boundsChange = diffOverrideBounds(bounds); in setBounds() 256 mTmpConfig.windowConfiguration.setBounds(bounds); in setBounds() 267 int diffOverrideBounds(Rect bounds) { in diffOverrideBounds() argument [all …]
|
D | StackWindowController.java | 179 public void resize(Rect bounds, SparseArray<Rect> taskBounds, in resize() argument 187 if (mContainer.setBounds(bounds, taskBounds, taskTempInsetBounds) in resize() 259 public void adjustConfigurationForBounds(Rect bounds, Rect insetBounds, in adjustConfigurationForBounds() argument 281 config.windowConfiguration.setBounds(bounds); in adjustConfigurationForBounds() 282 config.windowConfiguration.setAppBounds(!bounds.isEmpty() ? bounds : null); in adjustConfigurationForBounds() 289 && bounds.width() == mTmpDisplayBounds.width() in adjustConfigurationForBounds() 290 && bounds.height() == mTmpDisplayBounds.height()) { in adjustConfigurationForBounds() 310 insetBounds != null ? insetBounds : bounds, mTmpNonDecorInsets, in adjustConfigurationForBounds() 313 insetBounds != null ? insetBounds : bounds, mTmpStableInsets, in adjustConfigurationForBounds() 329 insetBounds != null ? insetBounds : bounds, density, windowingMode); in adjustConfigurationForBounds() [all …]
|
/frameworks/base/core/java/android/transition/ |
D | Explode.java | 85 Rect bounds = (Rect) endValues.values.get(PROPNAME_SCREEN_BOUNDS); in onAppear() local 88 calculateOut(sceneRoot, bounds, mTempLoc); in onAppear() 92 return TranslationAnimationCreator.createAnimation(view, endValues, bounds.left, bounds.top, in onAppear() 102 Rect bounds = (Rect) startValues.values.get(PROPNAME_SCREEN_BOUNDS); in onDisappear() local 103 int viewPosX = bounds.left; in onDisappear() 104 int viewPosY = bounds.top; in onDisappear() 113 endX += interruptedPosition[0] - bounds.left; in onDisappear() 114 endY += interruptedPosition[1] - bounds.top; in onDisappear() 115 bounds.offsetTo(interruptedPosition[0], interruptedPosition[1]); in onDisappear() 117 calculateOut(sceneRoot, bounds, mTempLoc); in onDisappear() [all …]
|
D | TransitionUtils.java | 94 RectF bounds = new RectF(0, 0, view.getWidth(), view.getHeight()); in copyViewImage() local 95 matrix.mapRect(bounds); in copyViewImage() 96 int left = Math.round(bounds.left); in copyViewImage() 97 int top = Math.round(bounds.top); in copyViewImage() 98 int right = Math.round(bounds.right); in copyViewImage() 99 int bottom = Math.round(bounds.bottom); in copyViewImage() 103 Bitmap bitmap = createViewBitmap(view, matrix, bounds, sceneRoot); in copyViewImage() 160 public static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds, in createViewBitmap() argument 174 int bitmapWidth = Math.round(bounds.width()); in createViewBitmap() 175 int bitmapHeight = Math.round(bounds.height()); in createViewBitmap() [all …]
|
/frameworks/support/transition/src/main/java/androidx/transition/ |
D | Explode.java | 87 Rect bounds = (Rect) endValues.values.get(PROPNAME_SCREEN_BOUNDS); in onAppear() local 90 calculateOut(sceneRoot, bounds, mTempLoc); in onAppear() 94 return TranslationAnimationCreator.createAnimation(view, endValues, bounds.left, bounds.top, in onAppear() 104 Rect bounds = (Rect) startValues.values.get(PROPNAME_SCREEN_BOUNDS); in onDisappear() local 105 int viewPosX = bounds.left; in onDisappear() 106 int viewPosY = bounds.top; in onDisappear() 115 endX += interruptedPosition[0] - bounds.left; in onDisappear() 116 endY += interruptedPosition[1] - bounds.top; in onDisappear() 117 bounds.offsetTo(interruptedPosition[0], interruptedPosition[1]); in onDisappear() 119 calculateOut(sceneRoot, bounds, mTempLoc); in onDisappear() [all …]
|
D | TransitionUtils.java | 55 RectF bounds = new RectF(0, 0, view.getWidth(), view.getHeight()); in copyViewImage() local 56 matrix.mapRect(bounds); in copyViewImage() 57 int left = Math.round(bounds.left); in copyViewImage() 58 int top = Math.round(bounds.top); in copyViewImage() 59 int right = Math.round(bounds.right); in copyViewImage() 60 int bottom = Math.round(bounds.bottom); in copyViewImage() 64 Bitmap bitmap = createViewBitmap(view, matrix, bounds, sceneRoot); in copyViewImage() 89 private static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds, in createViewBitmap() argument 111 int bitmapWidth = Math.round(bounds.width()); in createViewBitmap() 112 int bitmapHeight = Math.round(bounds.height()); in createViewBitmap() [all …]
|
/frameworks/base/tests/UiBench/src/com/android/test/uibench/ |
D | SaveLayerInterleaveActivity.java | 59 Rect bounds = getBounds(); in onCreate() 61 int smallRectHeight = (bounds.height()/regions); in onCreate() 63 int top = bounds.top; in onCreate() 71 canvas.saveLayer(bounds.left, top, bounds.right, top + padding, in onCreate() 74 canvas.drawText("offscreen line "+ i, bounds.left, top + padding, in onCreate() 78 Rect partX = new Rect(bounds.left, top + padding, in onCreate() 79 bounds.right,top + smallRectHeight - padding); in onCreate() 81 canvas.drawText("onscreen line "+ i, bounds.left, in onCreate()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | HardwareBgDrawable.java | 80 Rect bounds = getBounds(); in draw() local 81 int top = bounds.top + mPoint; in draw() 82 if (top > bounds.bottom) top = bounds.bottom; in draw() 84 mLayers[0].setBounds(bounds.left, bounds.top, bounds.right, top); in draw() 86 mLayers[1].setBounds(bounds.left, top, bounds.right, bounds.bottom); in draw()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/ |
D | DockState.java | 168 Rect bounds = dockAreaOverlay.getBounds(); in draw() local 169 int x = bounds.left + (bounds.width() - mHintTextBounds.x) / 2; in draw() 170 int y = bounds.top + (bounds.height() + mHintTextBounds.y) / 2; in draw() 174 canvas.rotate(-90f, bounds.centerX(), bounds.centerY()); in draw() 186 public void startAnimation(Rect bounds, int areaAlpha, int hintAlpha, int duration, in startAnimation() argument 219 if (bounds != null && !dockAreaOverlay.getBounds().equals(bounds)) { in startAnimation() 223 new Rect(dockAreaOverlay.getBounds()), bounds); in startAnimation() 229 dockAreaOverlay.setBounds(bounds); in startAnimation() 335 private Rect updateBoundsWithSystemInsets(Rect bounds, Rect insets) { 337 bounds.right += insets.left; [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | TaskLaunchParamsModifier.java | 128 static int getFreeformStartLeft(Rect bounds) { in getFreeformStartLeft() argument 129 return bounds.left + bounds.width() / MARGIN_SIZE_DENOMINATOR; in getFreeformStartLeft() 133 static int getFreeformStartTop(Rect bounds) { in getFreeformStartTop() argument 134 return bounds.top + bounds.height() / MARGIN_SIZE_DENOMINATOR; in getFreeformStartTop() 138 static int getFreeformWidth(Rect bounds) { in getFreeformWidth() argument 139 return bounds.width() / WINDOW_SIZE_DENOMINATOR; in getFreeformWidth() 143 static int getFreeformHeight(Rect bounds) { in getFreeformHeight() argument 144 return bounds.height() / WINDOW_SIZE_DENOMINATOR; in getFreeformHeight() 148 static int getHorizontalStep(Rect bounds) { in getHorizontalStep() argument 149 return Math.max(bounds.width() / STEP_DENOMINATOR, MINIMAL_STEP); in getHorizontalStep() [all …]
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | RippleComponent.java | 47 public RippleComponent(RippleDrawable owner, Rect bounds) { in RippleComponent() argument 49 mBounds = bounds; in RippleComponent() 72 private static float getTargetRadius(Rect bounds) { in getTargetRadius() argument 73 final float halfWidth = bounds.width() / 2.0f; in getTargetRadius() 74 final float halfHeight = bounds.height() / 2.0f; in getTargetRadius() 85 public void getBounds(Rect bounds) { in getBounds() argument 87 bounds.set(-r, -r, r, r); in getBounds()
|
/frameworks/opt/setupwizard/library/gingerbread/test/instrumentation/src/com/android/setupwizardlib/util/ |
D | LinkAccessibilityHelperTest.java | 125 Rect bounds = new Rect(); in testOnPopulateNodeForVirtualView() local 126 info.getBoundsInParent(bounds); in testOnPopulateNodeForVirtualView() 128 new Rect(dp2Px(10.5f), dp2Px(0f), dp2Px(18.5f), dp2Px(20.5f)), bounds); in testOnPopulateNodeForVirtualView() 142 Rect bounds = new Rect(); in testNullLayout() local 143 info.getBoundsInParent(bounds); in testNullLayout() 145 new Rect(0, 0, 1, 1), bounds); in testNullLayout() 161 Rect bounds = new Rect(); in testRtlLayout() local 162 info.getBoundsInParent(bounds); in testRtlLayout() 164 new Rect(dp2Px(481.5f), dp2Px(0f), dp2Px(489.5f), dp2Px(20.5f)), bounds); in testRtlLayout() 182 Rect bounds = new Rect(); in testMultilineLink() local [all …]
|
/frameworks/native/libs/ui/ |
D | GraphicBufferMapper.cpp | 113 const Rect& bounds, void** vaddr) in lock() argument 115 return lockAsync(handle, usage, bounds, vaddr, -1); in lock() 119 const Rect& bounds, android_ycbcr *ycbcr) in lockYCbCr() argument 121 return lockAsyncYCbCr(handle, usage, bounds, ycbcr, -1); in lockYCbCr() 136 uint32_t usage, const Rect& bounds, void** vaddr, int fenceFd) in lockAsync() argument 138 return lockAsync(handle, usage, usage, bounds, vaddr, fenceFd); in lockAsync() 142 uint64_t producerUsage, uint64_t consumerUsage, const Rect& bounds, in lockAsync() argument 150 asGralloc2Rect(bounds), fenceFd, vaddr); in lockAsync() 159 uint32_t usage, const Rect& bounds, android_ycbcr *ycbcr, int fenceFd) in lockAsyncYCbCr() argument 165 asGralloc2Rect(bounds), fenceFd, &layout); in lockAsyncYCbCr()
|
/frameworks/support/wear/src/androidTest/java/androidx/wear/widget/ |
D | RoundedDrawableTest.java | 96 Rect bounds = new Rect(0, 0, BITMAP_WIDTH, BITMAP_HEIGHT); in radiusIsAppliedCorrectly() local 100 mRoundedDrawable.setBounds(bounds); in radiusIsAppliedCorrectly() 105 eq(new RectF(0, 0, bounds.width(), bounds.height())), in radiusIsAppliedCorrectly() 115 Rect bounds = new Rect(0, 0, BITMAP_WIDTH, BITMAP_HEIGHT); in scalingIsAppliedCorrectly() local 119 mRoundedDrawable.setBounds(bounds); in scalingIsAppliedCorrectly() 123 assertEquals(bounds.centerX(), mBitmapDrawable.getBounds().centerX()); in scalingIsAppliedCorrectly() 124 assertEquals(bounds.centerY(), mBitmapDrawable.getBounds().centerY()); in scalingIsAppliedCorrectly() 128 eq(new RectF(0, 0, bounds.width(), bounds.height())), in scalingIsAppliedCorrectly()
|
/frameworks/native/services/surfaceflinger/ |
D | Transform.cpp | 199 Rect Transform::transform(const Rect& bounds, bool roundOutwards) const in transform() argument 202 vec2 lt( bounds.left, bounds.top ); in transform() 203 vec2 rt( bounds.right, bounds.top ); in transform() 204 vec2 lb( bounds.left, bounds.bottom ); in transform() 205 vec2 rb( bounds.right, bounds.bottom ); in transform() 227 FloatRect Transform::transform(const FloatRect& bounds) const in transform() 229 vec2 lt(bounds.left, bounds.top); in transform() 230 vec2 rt(bounds.right, bounds.top); in transform() 231 vec2 lb(bounds.left, bounds.bottom); in transform() 232 vec2 rb(bounds.right, bounds.bottom); in transform() [all …]
|
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/ |
D | StyledCornersBitmapDrawable.java | 217 protected void onBoundsChange(Rect bounds) { in onBoundsChange() argument 218 super.onBoundsChange(bounds); in onBoundsChange() 229 final Rect bounds = getBounds(); in draw() local 230 if (bounds.isEmpty()) { in draw() 249 float left = bounds.left + mBorderWidth / 2; in draw() 250 float top = bounds.top + mBorderWidth / 2; in draw() 251 float right = bounds.right - mBorderWidth / 2; in draw() 252 float bottom = bounds.bottom - mBorderWidth / 2; in draw() 302 final Rect bounds = getBounds(); in drawFakeCornersForCompatibilityMode() local 304 float left = bounds.left; in drawFakeCornersForCompatibilityMode() [all …]
|