/frameworks/base/core/tests/coretests/src/android/view/ |
D | FocusFinderTest.java | 19 import android.graphics.Rect; 42 new Rect(0, 30, 10, 40), // src (left, top, right, bottom) in testBelowNotCandidateForDirectionUp() 43 new Rect(0, 50, 10, 60)); // dest (left, top, right, bottom) in testBelowNotCandidateForDirectionUp() 48 final Rect src = new Rect(0, 30, 10, 40); in testAboveShareEdgeEdgeOkForDirectionUp() 50 final Rect dest = new Rect(src); in testAboveShareEdgeEdgeOkForDirectionUp() 62 new Rect(0, 0, 50, 50), in testCompletelyContainedNotCandidate() 63 new Rect(0, 1, 50, 49)); in testCompletelyContainedNotCandidate() 71 new Rect(0, 0, 50, 50), in testContinaedWithCommonBottomNotCandidate() 72 new Rect(0, 1, 50, 50)); in testContinaedWithCommonBottomNotCandidate() 80 new Rect(0, 0, 50, 50), in testOverlappingIsCandidateWhenBothEdgesAreInDirection() [all …]
|
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
D | StaggeredGridLayoutManagerWrapContentTest.java | 25 import android.graphics.Rect; 39 public StaggeredGridLayoutManagerWrapContentTest(Rect padding) { in StaggeredGridLayoutManagerWrapContentTest() 44 public static List<Rect> params() { in params() 46 new Rect(0, 0, 0, 0), in params() 47 new Rect(5, 0, 0, 0), in params() 48 new Rect(0, 3, 0, 0), in params() 49 new Rect(0, 0, 2, 0), in params() 50 new Rect(0, 0, 0, 7), in params() 51 new Rect(3, 5, 7, 11) in params() 70 Rect[] expected = new Rect[] { in testSimple() [all …]
|
D | GridLayoutManagerWrapContentTest.java | 27 import android.graphics.Rect; 43 public GridLayoutManagerWrapContentTest(Rect padding) { in GridLayoutManagerWrapContentTest() 48 public static List<Rect> params() { in params() 50 new Rect(0, 0, 0, 0), in params() 51 new Rect(5, 0, 0, 0), in params() 52 new Rect(0, 3, 0, 0), in params() 53 new Rect(0, 0, 2, 0), in params() 54 new Rect(0, 0, 0, 7), in params() 55 new Rect(3, 5, 7, 11) in params() 84 public void getItemOffsets(Rect outRect, View view, RecyclerView parent, in testVerticalWithItemDecors() [all …]
|
/frameworks/native/libs/ui/ |
D | Rect.cpp | 22 const Rect Rect::INVALID_RECT{0, 0, -1, -1}; 23 const Rect Rect::EMPTY_RECT{0, 0, 0, 0}; 33 void Rect::makeInvalid() { in makeInvalid() 40 bool Rect::operator <(const Rect& rhs) const { in operator <() 59 Rect& Rect::offsetTo(int32_t x, int32_t y) { in offsetTo() 67 Rect& Rect::offsetBy(int32_t x, int32_t y) { in offsetBy() 75 const Rect Rect::operator +(const Point& rhs) const { in operator +() 76 const Rect result(left + rhs.x, top + rhs.y, right + rhs.x, bottom + rhs.y); in operator +() 80 const Rect Rect::operator -(const Point& rhs) const { in operator -() 81 const Rect result(left - rhs.x, top - rhs.y, right - rhs.x, bottom - rhs.y); in operator -() [all …]
|
D | Region.cpp | 45 op_nand = region_operator<Rect>::op_nand, 46 op_and = region_operator<Rect>::op_and, 47 op_or = region_operator<Rect>::op_or, 48 op_xor = region_operator<Rect>::op_xor 56 const Region Region::INVALID_REGION(Rect::INVALID_RECT); 61 mStorage.add(Rect(0,0)); in Region() 72 Region::Region(const Rect& rhs) { in Region() 94 static void reverseRectsResolvingJunctions(const Rect* begin, const Rect* end, in reverseRectsResolvingJunctions() 95 Vector<Rect>& dst, int spanDirection) { in reverseRectsResolvingJunctions() 98 const Rect* current = end - 1; in reverseRectsResolvingJunctions() [all …]
|
/frameworks/native/include/ui/ |
D | Rect.h | 29 class Rect : public ARect, public LightFlattenablePod<Rect> 34 static const Rect INVALID_RECT; 35 static const Rect EMPTY_RECT; 40 inline Rect() : Rect(INVALID_RECT) {} in Rect() function 43 inline Rect(T w, T h) { in Rect() function 59 inline Rect(int32_t l, int32_t t, int32_t r, int32_t b) { in Rect() function 66 inline Rect(const Point& lt, const Point& rb) { in Rect() function 99 inline Rect getBounds() const { in getBounds() 100 return Rect(right - left, bottom - top); in getBounds() 128 inline bool operator == (const Rect& rhs) const { [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | BakedOpStateTests.cpp | 33 ClipRect clip(Rect(100, 200)); in TEST() 34 RectOp recordedOp(Rect(30, 40, 100, 200), translate10x20, &clip, &paint); in TEST() 37 auto parentSnapshot = TestUtils::makeSnapshot(Matrix4::identity(), Rect(100, 200)); in TEST() 40 EXPECT_EQ(Rect(100, 200), state.clipRect()); in TEST() 41 EXPECT_EQ(Rect(40, 60, 100, 200), state.clippedBounds); // translated and also clipped in TEST() 46 auto parentSnapshot = TestUtils::makeSnapshot(translate10x20, Rect(100, 200)); in TEST() 54 EXPECT_EQ(Rect(10, 20, 100, 200), state.clipRect()); in TEST() 57 EXPECT_EQ(Rect(50, 80, 100, 200), state.clippedBounds); in TEST() 68 ClipRect clip(Rect(100, 200)); in TEST() 69 RectOp recordedOp(Rect(1000, 1000), translate10x20, &clip, &paint); in TEST() [all …]
|
D | SnapshotTests.cpp | 26 auto actualRoot = TestUtils::makeSnapshot(Matrix4::identity(), Rect(0, 0, 100, 100)); in TEST() 27 auto root = TestUtils::makeSnapshot(Matrix4::identity(), Rect(10, 10, 90, 90)); in TEST() 28 auto child = TestUtils::makeSnapshot(Matrix4::identity(), Rect(50, 50, 90, 90)); in TEST() 33 ClipRect rect(Rect(0, 0, 75, 75)); in TEST() 38 EXPECT_EQ(Rect(50, 50, 75, 75), intersectWithChild->rect) << "Expect intersect with child"; in TEST() 46 EXPECT_EQ(Rect(10, 10, 75, 75), intersectWithRoot->rect) << "Expect intersect with root"; in TEST() 51 auto actualRoot = TestUtils::makeSnapshot(Matrix4::identity(), Rect(0, 0, 100, 100)); in TEST() 52 auto root = TestUtils::makeSnapshot(Matrix4::identity(), Rect(10, 10, 90, 90)); in TEST() 55 ClipRect rect(Rect(0, 0, 75, 75)); in TEST() 57 auto child = TestUtils::makeSnapshot(Matrix4::identity(), Rect(50, 50, 90, 90)); in TEST() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/stackdivider/ |
D | WindowManagerProxy.java | 23 import android.graphics.Rect; 43 private final Rect mDockedRect = new Rect(); 44 private final Rect mTempDockedTaskRect = new Rect(); 45 private final Rect mTempDockedInsetRect = new Rect(); 46 private final Rect mTempOtherTaskRect = new Rect(); 47 private final Rect mTempOtherInsetRect = new Rect(); 49 private final Rect mTmpRect1 = new Rect(); 50 private final Rect mTmpRect2 = new Rect(); 51 private final Rect mTmpRect3 = new Rect(); 52 private final Rect mTmpRect4 = new Rect(); [all …]
|
/frameworks/support/v4/java/android/support/v4/view/ |
D | GravityCompat.java | 20 import android.graphics.Rect; 30 void apply(int gravity, int w, int h, Rect container, Rect outRect, int layoutDirection); in apply() 31 void apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, in apply() 32 Rect outRect, int layoutDirection); in apply() 33 void applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection); in applyDisplay() 44 public void apply(int gravity, int w, int h, Rect container, Rect outRect, in apply() 50 public void apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, in apply() 51 Rect outRect, int layoutDirection) { in apply() 56 public void applyDisplay(int gravity, Rect display, Rect inoutObj, in applyDisplay() 69 public void apply(int gravity, int w, int h, Rect container, Rect outRect, in apply() [all …]
|
/frameworks/base/core/java/android/hardware/camera2/legacy/ |
D | ParameterUtils.java | 21 import android.graphics.Rect; 51 public static final Rect NORMALIZED_RECTANGLE_DEFAULT = new Rect( 58 new Camera.Area(new Rect(NORMALIZED_RECTANGLE_DEFAULT), 61 public static final Rect RECTANGLE_EMPTY = 62 new Rect(/*left*/0, /*top*/0, /*right*/0, /*bottom*/0); 73 public final Rect previewCrop; 75 public final Rect reportedCrop; 77 public ZoomData(int zoomIndex, Rect previewCrop, Rect reportedCrop) { in ZoomData() 98 public final Rect previewMetering; 104 public final Rect reportedMetering; [all …]
|
/frameworks/support/v4/tests/java/android/support/v4/view/ |
D | GravityCompatTest.java | 18 import android.graphics.Rect; 90 Rect outRect = new Rect(); in testApplyNoOffsetsLtr() 94 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() 100 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() 106 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() 112 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() 118 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() 124 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() 130 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() 136 new Rect(0, 0, 200, 100), outRect, ViewCompat.LAYOUT_DIRECTION_LTR); in testApplyNoOffsetsLtr() [all …]
|
/frameworks/base/core/java/android/view/ |
D | FocusFinderHelper.java | 19 import android.graphics.Rect; 36 public boolean isBetterCandidate(int direction, Rect source, Rect rect1, Rect rect2) { in isBetterCandidate() 40 public boolean beamBeats(int direction, Rect source, Rect rect1, Rect rect2) { in beamBeats() 44 public boolean isCandidate(Rect srcRect, Rect destRect, int direction) { in isCandidate() 48 public boolean beamsOverlap(int direction, Rect rect1, Rect rect2) { in beamsOverlap() 52 public static int majorAxisDistance(int direction, Rect source, Rect dest) { in majorAxisDistance() 56 public static int majorAxisDistanceToFarEdge(int direction, Rect source, Rect dest) { in majorAxisDistanceToFarEdge()
|
D | IWindowSession.aidl | 22 import android.graphics.Rect; 39 in int viewVisibility, out Rect outContentInsets, out Rect outStableInsets, in add() 42 in int viewVisibility, in int layerStackId, out Rect outContentInsets, in addToDisplay() 43 out Rect outStableInsets, out Rect outOutsets, out InputChannel outInputChannel); in addToDisplay() 45 in int viewVisibility, out Rect outContentInsets, out Rect outStableInsets); in addWithoutInputChannel() 47 in int viewVisibility, in int layerStackId, out Rect outContentInsets, in addToDisplayWithoutInputChannel() 48 out Rect outStableInsets); in addToDisplayWithoutInputChannel() 96 int flags, out Rect outFrame, out Rect outOverscanInsets, in relayout() 97 out Rect outContentInsets, out Rect outVisibleInsets, out Rect outStableInsets, in relayout() 98 out Rect outOutsets, out Rect outBackdropFrame, out Configuration outConfig, in relayout() [all …]
|
D | WindowInsets.java | 20 import android.graphics.Rect; 34 private Rect mSystemWindowInsets; 35 private Rect mWindowDecorInsets; 36 private Rect mStableInsets; 37 private Rect mTempRect; 51 private static final Rect EMPTY_RECT = new Rect(0, 0, 0, 0); 66 public WindowInsets(Rect systemWindowInsets, Rect windowDecorInsets, Rect stableInsets, in WindowInsets() 98 public WindowInsets(Rect systemWindowInsets) { in WindowInsets() 107 public Rect getSystemWindowInsets() { in getSystemWindowInsets() 109 mTempRect = new Rect(); in getSystemWindowInsets() [all …]
|
D | FocusFinder.java | 19 import android.graphics.Rect; 49 final Rect mFocusedRect = new Rect(); 50 final Rect mOtherRect = new Rect(); 51 final Rect mBestCandidateRect = new Rect(); 79 public View findNextFocusFromRect(ViewGroup root, Rect focusedRect, int direction) { in findNextFocusFromRect() 84 private View findNextFocus(ViewGroup root, View focused, Rect focusedRect, int direction) { in findNextFocus() 116 private View findNextFocus(ViewGroup root, View focused, Rect focusedRect, in findNextFocus() 174 View focused, Rect focusedRect, int direction) { in findNextFocusInRelativeDirection() 195 private void setFocusBottomRight(ViewGroup root, Rect focusedRect) { in setFocusBottomRight() 201 private void setFocusTopLeft(ViewGroup root, Rect focusedRect) { in setFocusTopLeft() [all …]
|
D | WindowManagerPolicy.java | 27 import android.graphics.Rect; 181 public void computeFrameLw(Rect parentFrame, Rect displayFrame, in computeFrameLw() 182 Rect overlayFrame, Rect contentFrame, Rect visibleFrame, Rect decorFrame, in computeFrameLw() 183 Rect stableFrame, Rect outsetFrame); in computeFrameLw() 191 public Rect getFrameLw(); in getFrameLw() 208 public Rect getDisplayFrameLw(); in getDisplayFrameLw() 217 public Rect getOverscanFrameLw(); in getOverscanFrameLw() 229 public Rect getContentFrameLw(); in getContentFrameLw() 241 public Rect getVisibleFrameLw(); in getVisibleFrameLw() 258 public Rect getGivenContentInsetsLw(); in getGivenContentInsetsLw() [all …]
|
/frameworks/native/libs/ui/tests/ |
D | Region_test.cpp | 28 void checkVertTJunction(const Rect* lhs, const Rect* rhs) { in checkVertTJunction() 34 for (const Rect* current = r.begin(); current < r.end(); current++) { in verifyNoTJunctions() 35 for (const Rect* other = current - 1; other >= r.begin(); other--) { in verifyNoTJunctions() 40 for (const Rect* other = current + 1; other < r.end(); other++) { in verifyNoTJunctions() 63 r.orSelf(Rect(1, 0, 2, 1)); in TEST_F() 64 r.orSelf(Rect(0, 1, 3, 2)); in TEST_F() 71 r.orSelf(Rect(1, 0, 2, 1)); in TEST_F() 72 r.orSelf(Rect(0, 2, 3, 3)); in TEST_F() 80 r.orSelf(Rect(100, 100, 500, 500)); in TEST_F() 91 r.orSelf(Rect(1, 0, 2, 1)); in TEST_F() [all …]
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/ |
D | BridgeWindowSession.java | 21 import android.graphics.Rect; 41 public int add(IWindow arg0, int seq, LayoutParams arg1, int arg2, Rect arg3, Rect arg4, in add() 50 Rect arg3, Rect arg4, Rect arg5, InputChannel outInputchannel) in addToDisplay() 58 Rect arg3, Rect arg4) in addWithoutInputChannel() 66 int displayId, Rect arg3, Rect arg4) in addToDisplayWithoutInputChannel() 91 int i3, int i4, int i5, Rect rect, Rect rect2, Rect rect3, Rect rect4, Rect rect5, in relayout() 92 Rect rect6, Rect rect7, Configuration configuration, Surface surface) in relayout() 100 long deferTransactionUntilFrame, Rect outFrame) { in repositionChild() 116 public void getDisplayFrame(IWindow window, Rect outDisplayFrame) { in getDisplayFrame() 136 public void setInsets(IWindow window, int touchable, Rect contentInsets, in setInsets() [all …]
|
/frameworks/base/libs/hwui/ |
D | ClipArea.h | 30 Rect transformAndCalculateBounds(const Rect& r, const Matrix4& transform); 35 TransformedRectangle(const Rect& bounds, const Matrix4& transform); 42 const Rect& getBounds() const { in getBounds() 46 Rect transformedBounds() const { in transformedBounds() 47 Rect transformedBounds(transformAndCalculateBounds(mBounds, mTransform)); in transformedBounds() 62 Rect mBounds; 75 void set(const Rect& bounds, const Matrix4& transform); 76 bool intersectWith(const Rect& bounds, const Matrix4& transform); 80 Rect calculateBounds() const; 102 ClipBase(const Rect& rect) in ClipBase() [all …]
|
/frameworks/support/v4/java/android/support/v4/widget/ |
D | FocusStrategy.java | 19 import android.graphics.Rect; 95 private final Rect mTemp1 = new Rect(); 96 private final Rect mTemp2 = new Rect(); 107 final Rect firstRect = mTemp1; in compare() 108 final Rect secondRect = mTemp2; in compare() 141 @Nullable T focused, @NonNull Rect focusedRect, int direction) { in findNextFocusInAbsoluteDirection() 144 final Rect bestCandidateRect = new Rect(focusedRect); in findNextFocusInAbsoluteDirection() 167 final Rect focusableRect = new Rect(); in findNextFocusInAbsoluteDirection() 198 @FocusRealDirection int direction, @NonNull Rect source, in isBetterCandidate() 199 @NonNull Rect candidate, @NonNull Rect currentBest) { in isBetterCandidate() [all …]
|
/frameworks/support/v4/tests/java/android/support/v4/widget/ |
D | ExploreByTouchHelperTest.java | 22 import android.graphics.Rect; 65 final Rect hostBounds = new Rect(); in testBoundsInScreen() 69 final Rect nodeBoundsInParent = new Rect(); in testBoundsInScreen() 73 final Rect hostBoundsOnScreen = getBoundsOnScreen(mHost); in testBoundsInScreen() 74 final Rect nodeBoundsInScreen = new Rect(); in testBoundsInScreen() 89 final Rect scrolledNodeBoundsInParent = new Rect(); in testBoundsInScreen() 94 final Rect expectedBoundsInScreen = new Rect(hostBoundsOnScreen); in testBoundsInScreen() 104 private static Rect getBoundsOnScreen(View v) { in getBoundsOnScreen() 106 final Rect hostBoundsOnScreen = new Rect(0, 0, v.getWidth(), v.getHeight()); in getBoundsOnScreen() 140 final Rect hostBounds = new Rect(0, 0, mHost.getWidth(), mHost.getHeight()); in onPopulateNodeForVirtualView()
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | BackdropFrameRenderer.java | 19 import android.graphics.Rect; 42 private final Rect mTargetRect = new Rect(); 49 private final Rect mOldTargetRect = new Rect(); 50 private final Rect mNewTargetRect = new Rect(); 73 private final Rect mOldSystemInsets = new Rect(); 74 private final Rect mOldStableInsets = new Rect(); 75 private final Rect mSystemInsets = new Rect(); 76 private final Rect mStableInsets = new Rect(); 78 public BackdropFrameRenderer(DecorView decorView, ThreadedRenderer renderer, Rect initialBounds, in BackdropFrameRenderer() 81 boolean fullscreen, Rect systemInsets, Rect stableInsets, int resizeMode) { in BackdropFrameRenderer() [all …]
|
/frameworks/opt/setupwizard/library/test/src/com/android/setupwizardlib/test/ |
D | DrawableLayoutDirectionHelperTest.java | 22 import android.graphics.Rect; 48 Rect outRect = new Rect(); in testCreateRelativeInsetDrawableLtr() 50 assertEquals("InsetDrawable padding should be same as inset", new Rect(1, 2, 3, 4), in testCreateRelativeInsetDrawableLtr() 65 Rect outRect = new Rect(); in testCreateRelativeInsetDrawableRtl() 67 assertEquals("InsetDrawable padding should be same as inset", new Rect(3, 2, 1, 4), in testCreateRelativeInsetDrawableRtl() 82 Rect outRect = new Rect(); in testCreateRelativeInsetDrawableViewRtl() 85 assertEquals("InsetDrawable padding should be same as inset", new Rect(3, 2, 1, 4), in testCreateRelativeInsetDrawableViewRtl() 88 assertEquals("InsetDrawable padding should be same as inset", new Rect(1, 2, 3, 4), in testCreateRelativeInsetDrawableViewRtl() 109 Rect outRect = new Rect(); in testCreateRelativeInsetDrawableContextRtl() 112 assertEquals("InsetDrawable padding should be same as inset", new Rect(3, 2, 1, 4), in testCreateRelativeInsetDrawableContextRtl() [all …]
|
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/ |
D | MarshalQueryableRect.java | 18 import android.graphics.Rect; 31 public class MarshalQueryableRect implements MarshalQueryable<Rect> { 34 private class MarshalerRect extends Marshaler<Rect> { 35 protected MarshalerRect(TypeReference<Rect> typeReference, in MarshalerRect() 41 public void marshal(Rect value, ByteBuffer buffer) { in marshal() 49 public Rect unmarshal(ByteBuffer buffer) { in unmarshal() 58 return new Rect(left, top, right, bottom); in unmarshal() 68 public Marshaler<Rect> createMarshaler(TypeReference<Rect> managedType, int nativeType) { in createMarshaler() 73 public boolean isTypeMappingSupported(TypeReference<Rect> managedType, int nativeType) { in isTypeMappingSupported() 74 return nativeType == TYPE_INT32 && (Rect.class.equals(managedType.getType())); in isTypeMappingSupported()
|