Home
last modified time | relevance | path

Searched refs:Point (Results 1 – 25 of 239) sorted by relevance

12345678910

/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/
DRegionTest.kt19 import android.graphics.Point
31 assertFalse(Point(1, 1) in Region()) in containsPoint()
32 assertTrue(Point(1, 1) in Region(0, 0, 2, 2)) in containsPoint()
37 assertFalse(Point(3, 3) in r) in unionRect()
38 assertTrue(Point(1, 1) in r) in unionRect()
39 assertTrue(Point(5, 5) in r) in unionRect()
44 assertFalse(Point(3, 3) in r) in unionRegion()
45 assertTrue(Point(1, 1) in r) in unionRegion()
46 assertTrue(Point(5, 5) in r) in unionRegion()
51 assertFalse(Point(3, 3) in r) in unionAsAndRect()
[all …]
DPointTest.kt19 import android.graphics.Point
26 val (x, y) = Point(2, 3) in destructuringInt()
38 val (x, y) = Point(2, 3) + 2 in offsetInt()
50 val (x, y) = Point(2, 3) + Point(1, 2) in offsetPoint()
62 val (x, y) = Point(2, 3) - 2 in negativeOffsetInt()
74 val (x, y) = Point(2, 3) - Point(1, 2) in negativeOffsetPoint()
86 val (x, y) = -Point(2, 3) in negateInt()
98 val pointF = Point(1, 2).toPointF() in toPointF()
104 assertEquals(Point(1, 2), PointF(1.1f, 2.8f).toPoint()) in toPoint()
/frameworks/base/media/mca/filterfw/java/android/filterfw/geometry/
DPoint.java25 public class Point { class
30 public Point() { in Point() method in Point
33 public Point(float x, float y) { in Point() method in Point
48 public Point plus(float x, float y) { in plus()
49 return new Point(this.x + x, this.y + y); in plus()
52 public Point plus(Point point) { in plus()
56 public Point minus(float x, float y) { in minus()
57 return new Point(this.x - x, this.y - y); in minus()
60 public Point minus(Point point) { in minus()
64 public Point times(float s) { in times()
[all …]
DRectangle.java20 import android.filterfw.geometry.Point;
32 super(new Point(x, y), in Rectangle()
33 new Point(x + width, y), in Rectangle()
34 new Point(x, y + height), in Rectangle()
35 new Point(x + width, y + height)); in Rectangle()
38 public Rectangle(Point origin, Point size) { in Rectangle()
45 public static Rectangle fromRotatedRect(Point center, Point size, float rotation) { in fromRotatedRect()
46 Point p0 = new Point(center.x - size.x/2f, center.y - size.y/2f); in fromRotatedRect()
47 Point p1 = new Point(center.x + size.x/2f, center.y - size.y/2f); in fromRotatedRect()
48 Point p2 = new Point(center.x - size.x/2f, center.y + size.y/2f); in fromRotatedRect()
[all …]
DQuad.java20 import android.filterfw.geometry.Point;
32 public Point p0;
33 public Point p1;
34 public Point p2;
35 public Point p3;
40 public Quad(Point p0, Point p1, Point p2, Point p3) { in Quad()
54 public Quad translated(Point t) { in translated()
/frameworks/native/libs/ui/include/ui/
DPoint.h25 class Point : public LightFlattenablePod<Point>
35 inline Point() { in Point() function
37 inline Point(int _x, int _y) : x(_x), y(_y) { in Point() function
40 inline bool operator == (const Point& rhs) const {
43 inline bool operator != (const Point& rhs) const {
53 bool operator < (const Point& rhs) const {
57 inline Point& operator - () {
63 inline Point& operator += (const Point& rhs) {
68 inline Point& operator -= (const Point& rhs) {
74 const Point operator + (const Point& rhs) const {
[all …]
DRect.h65 inline Rect(const Point& lt, const Point& rb) { in Rect()
114 void setLeftTop(const Point& lt) { in setLeftTop()
119 void setRightBottom(const Point& rb) { in setRightBottom()
125 Point leftTop() const { in leftTop()
126 return Point(left, top); in leftTop()
128 Point rightBottom() const { in rightBottom()
129 return Point(right, bottom); in rightBottom()
131 Point rightTop() const { in rightTop()
132 return Point(right, top); in rightTop()
134 Point leftBottom() const { in leftBottom()
[all …]
/frameworks/native/libs/ui/include_vndk/ui/
DPoint.h25 class Point : public LightFlattenablePod<Point>
35 inline Point() { in Point() function
37 inline Point(int _x, int _y) : x(_x), y(_y) { in Point() function
40 inline bool operator == (const Point& rhs) const {
43 inline bool operator != (const Point& rhs) const {
53 bool operator < (const Point& rhs) const {
57 inline Point& operator - () {
63 inline Point& operator += (const Point& rhs) {
68 inline Point& operator -= (const Point& rhs) {
74 const Point operator + (const Point& rhs) const {
[all …]
DRect.h65 inline Rect(const Point& lt, const Point& rb) { in Rect()
114 void setLeftTop(const Point& lt) { in setLeftTop()
119 void setRightBottom(const Point& rb) { in setRightBottom()
125 Point leftTop() const { in leftTop()
126 return Point(left, top); in leftTop()
128 Point rightBottom() const { in rightBottom()
129 return Point(right, bottom); in rightBottom()
131 Point rightTop() const { in rightTop()
132 return Point(right, top); in rightTop()
134 Point leftBottom() const { in leftBottom()
[all …]
/frameworks/support/core/ktx/src/main/java/androidx/core/graphics/
DPoint.kt21 import android.graphics.Point
33 inline operator fun Point.component1() = this.x in component1()
44 inline operator fun Point.component2() = this.y in component1()
71 inline operator fun Point.plus(p: Point): Point { in component1()
72 return Point(x, y).apply { in component1()
90 inline operator fun Point.plus(xy: Int): Point { in plus()
91 return Point(x, y).apply { in plus()
110 inline operator fun Point.minus(p: Point): Point { in minus()
111 return Point(x, y).apply { in minus()
130 inline operator fun Point.minus(xy: Int): Point { in minus()
[all …]
/frameworks/base/media/mca/filterpacks/native/base/
Dgeometry.h28 class Point {
30 Point() : x_(0.0f), y_(0.0f) {} in Point() function
31 Point(float x, float y) : x_(x), y_(y) {} in Point() function
38 static float Distance(const Point& p0, const Point& p1);
41 Point operator+(const Point& other) const;
42 Point operator-(const Point& other) const;
43 Point operator*(float factor) const;
56 Quad(const Point& p0, const Point& p1, const Point& p2, const Point& p3) in Quad()
64 const std::vector<Point>& points() const { return points_; } in points()
65 const Point& point(int ix) const;
[all …]
Dgeometry.cpp27 float Point::Length() const { in Length()
31 bool Point::ScaleTo(float new_length) { in ScaleTo()
41 float Point::Distance(const Point& p0, const Point& p1) { in Distance()
42 Point diff = p1 - p0; in Distance()
46 Point Point::operator+(const Point& other) const { in operator +()
47 Point out; in operator +()
53 Point Point::operator-(const Point& other) const { in operator -()
54 Point out; in operator -()
60 Point Point::operator*(float factor) const { in operator *()
61 Point out; in operator *()
[all …]
/frameworks/base/media/mca/filterfw/native/core/
Dgeometry.h28 class Point {
30 Point() : x_(0.0f), y_(0.0f) {} in Point() function
31 Point(float x, float y) : x_(x), y_(y) {} in Point() function
38 static float Distance(const Point& p0, const Point& p1);
41 Point operator+(const Point& other) const;
42 Point operator-(const Point& other) const;
43 Point operator*(float factor) const;
56 Quad(const Point& p0, const Point& p1, const Point& p2, const Point& p3) in Quad()
64 const std::vector<Point>& points() const { return points_; } in points()
65 const Point& point(int ix) const;
[all …]
Dgeometry.cpp26 float Point::Length() const { in Length()
30 bool Point::ScaleTo(float new_length) { in ScaleTo()
40 float Point::Distance(const Point& p0, const Point& p1) { in Distance()
41 Point diff = p1 - p0; in Distance()
45 Point Point::operator+(const Point& other) const { in operator +()
46 Point out; in operator +()
52 Point Point::operator-(const Point& other) const { in operator -()
53 Point out; in operator -()
59 Point Point::operator*(float factor) const { in operator *()
60 Point out; in operator *()
[all …]
/frameworks/support/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/
DGridModelTest.java25 import android.graphics.Point;
66 private Point mSelectionOrigin;
67 private Point mSelectionPoint;
79 startSelection(new Point(0, 10)); in testSelectionLeftOfItems()
80 resizeSelection(new Point(1, 11)); in testSelectionLeftOfItems()
88 startSelection(new Point(mViewWidth - 1, 10)); in testSelectionRightOfItems()
89 resizeSelection(new Point(mViewWidth - 2, 11)); in testSelectionRightOfItems()
97 startSelection(new Point(10, 0)); in testSelectionAboveItems()
98 resizeSelection(new Point(11, 1)); in testSelectionAboveItems()
106 startSelection(new Point(10, VIEWPORT_HEIGHT - 1)); in testSelectionBelowItems()
[all …]
DViewAutoScrollerTest.java23 import android.graphics.Point;
55 mScroller.scroll(new Point(0, VIEW_HEIGHT / 2)); in testNoScrollWhenOutOfScrollZone()
69 mScroller.scroll(new Point(0, TOP_Y_POINT)); in testMotionThreshold()
72 mScroller.scroll(new Point(0, TOP_Y_POINT - 1)); in testMotionThreshold()
81 mScroller.scroll(new Point(0, TOP_Y_POINT)); in testMotionThreshold_Resets()
84 mScroller.scroll(new Point(0, TOP_Y_POINT - 20)); in testMotionThreshold_Resets()
92 mScroller.scroll(new Point(0, TOP_Y_POINT)); in testMotionThreshold_Resets()
101 mScroller.scroll(new Point(0, TOP_Y_POINT)); in testAutoScrolls_Top()
104 mScroller.scroll(new Point(0, TOP_Y_POINT - 20)); in testAutoScrolls_Top()
113 mScroller.scroll(new Point(0, BOTTOM_Y_POINT)); in testAutoScrolls_Bottom()
[all …]
/frameworks/base/graphics/java/android/graphics/
DPoint.java29 public class Point implements Parcelable { class
33 public Point() {} in Point() method in Point
35 public Point(int x, int y) { in Point() method in Point
40 public Point(Point src) { in Point() method in Point
81 Point point = (Point) o; in equals()
140 public static final Parcelable.Creator<Point> CREATOR = new Parcelable.Creator<Point>() {
144 public Point createFromParcel(Parcel in) {
145 Point r = new Point();
153 public Point[] newArray(int size) {
154 return new Point[size];
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DPoint.java19 public class Point { class
24 public Point(float x, float y) { in Point() method in Point
30 public Point(float x, float y, long timeOffsetNano) { in Point() method in Point
36 public boolean equals(Point p) { in equals()
40 public float dist(Point a) { in dist()
48 public float crossProduct(Point a, Point b) { in crossProduct()
56 public float dotProduct(Point a, Point b) { in dotProduct()
66 public float getAngle(Point a, Point b) { in getAngle()
/frameworks/base/core/java/android/hardware/camera2/params/
DFace.java20 import android.graphics.Point;
56 private final Point mLeftEye;
57 private final Point mRightEye;
58 private final Point mMouth;
89 Point leftEyePosition, Point rightEyePosition, Point mouthPosition) { in Face()
207 public Point getLeftEyePosition() { in getLeftEyePosition()
223 public Point getRightEyePosition() { in getRightEyePosition()
240 public Point getMouthPosition() { in getMouthPosition()
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DSize.java19 import android.graphics.Point;
93 private final Point val;
99 val = new Point(width, height); in Size()
107 val = new Point(0, 0); in Size()
109 val = new Point(other.width(), other.height()); in Size()
120 val = new Point(0, 0); in Size()
122 val = new Point(other.width, other.height); in Size()
133 val = new Point(0, 0); in Size()
135 val = new Point(other.getWidth(), other.getHeight()); in Size()
144 public Size(Point p) { in Size()
[all …]
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
DFixedRotationFilter.java27 import android.filterfw.geometry.Point;
74 Point p1 = new Point(0.0f, 0.0f); in process()
75 Point p2 = new Point(1.0f, 0.0f); in process()
76 Point p3 = new Point(0.0f, 1.0f); in process()
77 Point p4 = new Point(1.0f, 1.0f); in process()
DRotateFilter.java29 import android.filterfw.geometry.Point;
140 Point x0 = new Point(0.5f * (-cosTheta + sinTheta + 1f), in updateParameters()
142 Point x1 = new Point(0.5f * (cosTheta + sinTheta + 1f), in updateParameters()
144 Point x2 = new Point(0.5f * (-cosTheta - sinTheta + 1f), in updateParameters()
146 Point x3 = new Point(0.5f * (cosTheta - sinTheta + 1f), in updateParameters()
DStraightenFilter.java29 import android.filterfw.geometry.Point;
123 Point p0 = new Point(-cosTheta * mWidth + sinTheta * mHeight, in updateParameters()
126 Point p1 = new Point(cosTheta * mWidth + sinTheta * mHeight, in updateParameters()
129 Point p2 = new Point(-cosTheta * mWidth - sinTheta * mHeight, in updateParameters()
132 Point p3 = new Point(cosTheta * mWidth - sinTheta * mHeight, in updateParameters()
/frameworks/base/core/java/com/android/internal/policy/
DPipSnapAlgorithm.java22 import android.graphics.Point;
109 float velocityY, Point dragStartPosition) { in findClosestSnapBounds()
111 final Point intersect = getEdgeIntersect(stackBounds, movementBounds, velocityX, velocityY, in findClosestSnapBounds()
122 public Point getEdgeIntersect(Rect stackBounds, Rect movementBounds, float velX, float velY, in getEdgeIntersect()
123 Point dragStartPosition) { in getEdgeIntersect()
133 Point vertPoint = new Point(); in getEdgeIntersect()
135 Point horizPoint = new Point(); in getEdgeIntersect()
214 final Point[] snapTargets = new Point[mSnapGravities.size()]; in findClosestSnapBounds()
218 snapTargets[i] = new Point(tmpBounds.left, tmpBounds.top); in findClosestSnapBounds()
220 Point snapTarget = findClosestPoint(stackBounds.left, stackBounds.top, snapTargets); in findClosestSnapBounds()
[all …]
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DUiObject.java19 import android.graphics.Point;
942 Point startPoint1 = new Point(rect.centerX() - FINGER_TOUCH_HALF_WIDTH, rect.centerY()); in pinchOut()
943 Point startPoint2 = new Point(rect.centerX() + FINGER_TOUCH_HALF_WIDTH, rect.centerY()); in pinchOut()
946 Point endPoint1 = new Point(rect.centerX() - (int)((rect.width()/2) * percentage), in pinchOut()
948 Point endPoint2 = new Point(rect.centerX() + (int)((rect.width()/2) * percentage), in pinchOut()
979 Point startPoint1 = new Point(rect.centerX() - (int)((rect.width()/2) * percentage), in pinchIn()
981 Point startPoint2 = new Point(rect.centerX() + (int)((rect.width()/2) * percentage), in pinchIn()
984 Point endPoint1 = new Point(rect.centerX() - FINGER_TOUCH_HALF_WIDTH, rect.centerY()); in pinchIn()
985 Point endPoint2 = new Point(rect.centerX() + FINGER_TOUCH_HALF_WIDTH, rect.centerY()); in pinchIn()
1003 public boolean performTwoPointerGesture(Point startPoint1, Point startPoint2, Point endPoint1, in performTwoPointerGesture()
[all …]

12345678910