Home
last modified time | relevance | path

Searched refs:bounds (Results 1 – 25 of 263) sorted by relevance

1234567891011

/frameworks/base/core/java/com/android/internal/policy/
DDockedDividerUtils.java62 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/base/services/tests/wmtests/src/com/android/server/wm/utils/
DDisplayRotationUtilTest.java103 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot0() local
104 assertThat(util.getRotatedBounds(bounds, ROTATION_0, 200, 300), in testGetRotatedBounds_top_rot0()
105 equalTo(bounds)); in testGetRotatedBounds_top_rot0()
111 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot90() local
112 assertThat(util.getRotatedBounds(bounds, ROTATION_90, 200, 300), in testGetRotatedBounds_top_rot90()
119 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot180() local
120 assertThat(util.getRotatedBounds(bounds, ROTATION_180, 200, 300), in testGetRotatedBounds_top_rot180()
127 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot270() local
128 assertThat(util.getRotatedBounds(bounds, ROTATION_270, 200, 300), in testGetRotatedBounds_top_rot270()
135 Rect[] bounds = new Rect[] {new Rect(0, 50, 10, 150), ZERO_RECT, ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_left_rot0() local
[all …]
/frameworks/base/core/java/android/view/animation/
DTransformation.java127 Rect bounds = t.getClipRect(); in compose() local
129 setClipRect(mClipRect.left + bounds.left, mClipRect.top + bounds.top, in compose()
130 mClipRect.right + bounds.right, mClipRect.bottom + bounds.bottom); in compose()
132 setClipRect(bounds); in compose()
146 Rect bounds = t.getClipRect(); in postCompose() local
148 setClipRect(mClipRect.left + bounds.left, mClipRect.top + bounds.top, in postCompose()
149 mClipRect.right + bounds.right, mClipRect.bottom + bounds.bottom); in postCompose()
151 setClipRect(bounds); in postCompose()
/frameworks/base/libs/hwui/tests/common/scenes/
DSaveLayer2Animation.cpp37 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/core/java/android/transition/
DExplode.java85 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 …]
DTransitionUtils.java94 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/base/services/core/java/com/android/server/wm/
DConfigurationContainer.java230 public boolean equivalentRequestedOverrideBounds(Rect bounds) { in equivalentRequestedOverrideBounds() argument
231 return equivalentBounds(getRequestedOverrideBounds(), bounds); in equivalentRequestedOverrideBounds()
237 public static boolean equivalentBounds(Rect bounds, Rect other) { in equivalentBounds() argument
238 return bounds == other in equivalentBounds()
239 || (bounds != null && (bounds.equals(other) || (bounds.isEmpty() && other == null))) in equivalentBounds()
240 || (other != null && other.isEmpty() && bounds == null); in equivalentBounds()
261 Rect bounds = getBounds(); in getPosition() local
262 out.set(bounds.left, bounds.top); in getPosition()
301 public int setBounds(Rect bounds) { in setBounds() argument
302 int boundsChange = diffRequestedOverrideBounds(bounds); in setBounds()
[all …]
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
DSaveLayerInterleaveActivity.java59 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/libs/hwui/hwui/
DCanvas.cpp87 float y, minikin::MinikinRect& bounds, float totalAdvance) in DrawTextFunctor() argument
93 , bounds(bounds) in DrawTextFunctor()
125 canvas->drawGlyphs(glyphFunc, glyphCount, outlinePaint, x, y, bounds.mLeft, bounds.mTop, in operator ()()
126 bounds.mRight, bounds.mBottom, totalAdvance); in operator ()()
132 canvas->drawGlyphs(glyphFunc, glyphCount, innerPaint, x, y, bounds.mLeft, bounds.mTop, in operator ()()
133 bounds.mRight, bounds.mBottom, totalAdvance); in operator ()()
136 canvas->drawGlyphs(glyphFunc, glyphCount, paint, x, y, bounds.mLeft, bounds.mTop, in operator ()()
137 bounds.mRight, bounds.mBottom, totalAdvance); in operator ()()
147 minikin::MinikinRect& bounds; member in android::DrawTextFunctor
162 minikin::MinikinRect bounds; in drawText() local
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DHardwareBgDrawable.java80 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/legacy/recents/src/com/android/systemui/recents/views/
DDockState.java168 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/graphics/java/android/graphics/drawable/
DRippleComponent.java40 public RippleComponent(RippleDrawable owner, Rect bounds) { in RippleComponent() argument
42 mBounds = bounds; in RippleComponent()
65 private static float getTargetRadius(Rect bounds) { in getTargetRadius() argument
66 final float halfWidth = bounds.width() / 2.0f; in getTargetRadius()
67 final float halfHeight = bounds.height() / 2.0f; in getTargetRadius()
78 public void getBounds(Rect bounds) { in getBounds() argument
80 bounds.set(-r, -r, r, r); in getBounds()
/frameworks/base/libs/hwui/pipeline/skia/
DSkiaDisplayList.cpp55 static bool intersects(const SkISize screenSize, const Matrix4& mat, const SkRect& bounds) { in intersects() argument
56 Vector3 points[] = { Vector3 {bounds.fLeft, bounds.fTop, 0}, in intersects()
57 Vector3 {bounds.fRight, bounds.fTop, 0}, in intersects()
58 Vector3 {bounds.fRight, bounds.fBottom, 0}, in intersects()
59 Vector3 {bounds.fLeft, bounds.fBottom, 0}}; in intersects()
142 const SkRect& bounds = vectorDrawable->properties().getBounds(); in prepareListAndChildren() local
143 if (intersects(info.screenSize, totalMatrix, bounds)) { in prepareListAndChildren()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DDisplayCutoutView.java115 Region bounds = new Region(displayCutout.getBoundingRectTop()); in boundsFromDirection() local
118 bounds.op(0, 0, Integer.MAX_VALUE, displayCutout.getSafeInsetTop(), in boundsFromDirection()
120 out.set(bounds.getBounds()); in boundsFromDirection()
123 bounds.op(0, 0, displayCutout.getSafeInsetLeft(), Integer.MAX_VALUE, in boundsFromDirection()
125 out.set(bounds.getBounds()); in boundsFromDirection()
128 bounds.op(0, displayCutout.getSafeInsetTop() + 1, Integer.MAX_VALUE, in boundsFromDirection()
130 out.set(bounds.getBounds()); in boundsFromDirection()
133 bounds.op(displayCutout.getSafeInsetLeft() + 1, 0, Integer.MAX_VALUE, in boundsFromDirection()
135 out.set(bounds.getBounds()); in boundsFromDirection()
138 bounds.recycle(); in boundsFromDirection()
/frameworks/opt/setupwizard/library/gingerbread/test/instrumentation/src/com/android/setupwizardlib/util/
DLinkAccessibilityHelperTest.java123 Rect bounds = new Rect(); in testOnPopulateNodeForVirtualView() local
124 info.getBoundsInParent(bounds); in testOnPopulateNodeForVirtualView()
128 bounds); in testOnPopulateNodeForVirtualView()
142 Rect bounds = new Rect(); in testNullLayout() local
143 info.getBoundsInParent(bounds); in testNullLayout()
144 assertEquals("LinkSpan bounds should be (0, 0, 1, 1)", new Rect(0, 0, 1, 1), bounds); in testNullLayout()
160 Rect bounds = new Rect(); in testRtlLayout() local
161 info.getBoundsInParent(bounds); in testRtlLayout()
165 bounds); in testRtlLayout()
186 Rect bounds = new Rect(); in testMultilineLink() local
[all …]
/frameworks/native/libs/ui/
DGraphicBufferMapper.cpp108 status_t GraphicBufferMapper::lock(buffer_handle_t handle, uint32_t usage, const Rect& bounds, in lock() argument
111 return lockAsync(handle, usage, bounds, vaddr, -1, outBytesPerPixel, outBytesPerStride); in lock()
115 const Rect& bounds, android_ycbcr *ycbcr) in lockYCbCr() argument
117 return lockAsyncYCbCr(handle, usage, bounds, ycbcr, -1); in lockYCbCr()
131 status_t GraphicBufferMapper::lockAsync(buffer_handle_t handle, uint32_t usage, const Rect& bounds, in lockAsync() argument
134 return lockAsync(handle, usage, usage, bounds, vaddr, fenceFd, outBytesPerPixel, in lockAsync()
139 uint64_t consumerUsage, const Rect& bounds, void** vaddr, in lockAsync() argument
146 return mMapper->lock(handle, usage, bounds, fenceFd, vaddr, outBytesPerPixel, in lockAsync()
151 uint32_t usage, const Rect& bounds, android_ycbcr *ycbcr, int fenceFd) in lockAsyncYCbCr() argument
155 return mMapper->lock(handle, usage, bounds, fenceFd, ycbcr); in lockAsyncYCbCr()
DTransform.cpp208 Rect Transform::transform(const Rect& bounds, bool roundOutwards) const in transform() argument
211 vec2 lt( bounds.left, bounds.top ); in transform()
212 vec2 rt( bounds.right, bounds.top ); in transform()
213 vec2 lb( bounds.left, bounds.bottom ); in transform()
214 vec2 rb( bounds.right, bounds.bottom ); in transform()
236 FloatRect Transform::transform(const FloatRect& bounds) const in transform()
238 vec2 lt(bounds.left, bounds.top); in transform()
239 vec2 rt(bounds.right, bounds.top); in transform()
240 vec2 lb(bounds.left, bounds.bottom); in transform()
241 vec2 rb(bounds.right, bounds.bottom); in transform()
[all …]
/frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/
DAdaptiveOutlineDrawable.java62 final Rect bounds = getBounds(); in draw() local
65 final float scaleX = (bounds.right - bounds.left) / pathSize; in draw()
66 final float scaleY = (bounds.bottom - bounds.top) / pathSize; in draw()
75 canvas.drawBitmap(mBitmap, bounds.left + mInsetPx, bounds.top + mInsetPx, null); in draw()
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
DStyledCornersBitmapDrawable.java217 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 …]
/frameworks/base/services/core/java/com/android/server/wm/utils/
DDisplayRotationUtil.java73 Rect[] bounds, int rotation, int initialDisplayWidth, int initialDisplayHeight) { in getRotatedBounds() argument
74 if (bounds.length != BOUNDS_POSITION_LENGTH) { in getRotatedBounds()
76 "bounds must have exactly 4 elements: bounds=" + bounds); in getRotatedBounds()
79 return bounds; in getRotatedBounds()
84 for (int i = 0; i < bounds.length; i++) { in getRotatedBounds()
86 final Rect rect = bounds[i]; in getRotatedBounds()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DPixelCopyWindow.java58 final Rect bounds = getBounds(); in onCreate()
59 canvas.drawRect(bounds, mPaint); in onCreate()
61 canvas.drawLine(bounds.centerX(), 0, bounds.centerX(), bounds.height(), mPaint); in onCreate()
63 canvas.drawLine(0, bounds.centerY(), bounds.width(), bounds.centerY(), mPaint); in onCreate()
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/
DAssistVisualizer.java36 final Rect bounds; field in AssistVisualizer.TextEntry
50 bounds = new Rect(left, top, left+node.getWidth(), top+node.getHeight()); in TextEntry()
118 Log.d(TAG, "View " + te.className + " " + te.bounds.toShortString() in logText()
186 canvas.drawRect(te.bounds.left - mTmpLocation[0], te.bounds.top - mTmpLocation[1],
187 te.bounds.right - mTmpLocation[0], te.bounds.bottom - mTmpLocation[1],
195 … canvas.drawRect(0, 0, te.bounds.right - te.bounds.left, te.bounds.bottom - te.bounds.top,
200 te.bounds.right - te.bounds.left, te.lineBaselines[j] - te.scrollY,
/frameworks/base/libs/hwui/tests/unit/
DSkiaDisplayListTests.cpp111 SkRect bounds = SkRect::MakeWH(200, 200); in TEST() local
113 vectorDrawable.mutateStagingProperties()->setBounds(bounds); in TEST()
126 EXPECT_EQ(vectorDrawable.mutateProperties()->getBounds(), bounds); in TEST()
155 const auto bounds = SkRect::MakeIWH(100, 100); in RENDERTHREAD_SKIA_PIPELINE_TEST() local
159 cleanVD.mutateProperties()->setBounds(bounds); in RENDERTHREAD_SKIA_PIPELINE_TEST()
172 dirtyVD.mutateProperties()->setBounds(bounds); in RENDERTHREAD_SKIA_PIPELINE_TEST()
222 const auto bounds = SkRect::MakeIWH(100, 100); in RENDERTHREAD_SKIA_PIPELINE_TEST() local
224 for (const SkRect b : {bounds.makeOffset(width, 0), in RENDERTHREAD_SKIA_PIPELINE_TEST()
225 bounds.makeOffset(0, height), in RENDERTHREAD_SKIA_PIPELINE_TEST()
226 bounds.makeOffset(-bounds.width(), 0), in RENDERTHREAD_SKIA_PIPELINE_TEST()
[all …]
/frameworks/base/libs/hwui/
DRenderProperties.cpp161 Rect bounds; in debugOutputProperties() local
162 getRevealClip().getBounds(&bounds); in debugOutputProperties()
163 output << indent << "(Clip to reveal clip with bounds " << bounds.left << ", " << bounds.top in debugOutputProperties()
164 << ", " << bounds.right << ", " << bounds.bottom << ")" << std::endl; in debugOutputProperties()
172 const Rect& bounds = outline.getBounds(); in debugOutputProperties() local
173 output << indent << "(Clip to outline with bounds " << bounds.left << ", " << bounds.top in debugOutputProperties()
174 << ", " << bounds.right << ", " << bounds.bottom << ")" << std::endl; in debugOutputProperties()
/frameworks/base/core/java/android/widget/
DScrollBarDrawable.java163 protected void onBoundsChange(Rect bounds) { in onBoundsChange() argument
164 super.onBoundsChange(bounds); in onBoundsChange()
195 private void drawTrack(Canvas canvas, Rect bounds, boolean vertical) { in drawTrack() argument
205 track.setBounds(bounds); in drawTrack()
211 private void drawThumb(Canvas canvas, Rect bounds, int offset, int length, boolean vertical) { in drawThumb() argument
217 thumb.setBounds(bounds.left, bounds.top + offset, in drawThumb()
218 bounds.right, bounds.top + offset + length); in drawThumb()
227 thumb.setBounds(bounds.left + offset, bounds.top, in drawThumb()
228 bounds.left + offset + length, bounds.bottom); in drawThumb()

1234567891011