/frameworks/base/libs/hwui/utils/ |
H A D | VectorDrawableUtils.cpp | 36 char cmd, const std::vector<float>* points, size_t start, size_t end); 72 resolver.addCommand(outPath, previousCommand, data.verbs[i], &data.points, start, 90 outData->points.resize(from.points.size()); 94 for (size_t i = 0; i < from.points.size(); i++) { 95 outData->points[i] = from.points[i] * (1 - fraction) + to.points[i] * fraction; 249 // Use the given verb, and points in the range [start, end) to insert a command into the SkPath. 251 char cmd, const std::vector<float>* points, size_ 250 addCommand(SkPath* outPath, char previousCmd, char cmd, const std::vector<float>* points, size_t start, size_t end) argument [all...] |
/frameworks/base/core/java/android/gesture/ |
H A D | GestureUtils.java | 141 float[] strokepoints = stroke.points; 262 * points. 265 * @param numPoints the number of points 266 * @return the sampled points in the form of [x1, y1, x2, y2, ..., xn, yn] 273 float[] pts = stroke.points; 325 * Calculates the centroid of a set of points. 327 * @param points the points in the form of [x1, y1, x2, y2, ..., xn, yn] 330 static float[] computeCentroid(float[] points) { argument 333 int count = points 352 computeCoVariance(float[] points) argument 376 computeTotalLength(float[] points) argument 387 computeStraightness(float[] points) argument 394 computeStraightness(float[] points, float totalLen) argument 499 computeOrientedBoundingBox(float[] points, float[] centroid) argument 563 rotate(float[] points, float angle) argument 576 translate(float[] points, float dx, float dy) argument 585 scale(float[] points, float sx, float sy) argument [all...] |
H A D | GestureStroke.java | 31 * consists of a sequence of timed points. One or multiple strokes form a gesture. 39 public final float[] points; field in class:GestureStroke 45 * A constructor that constructs a gesture stroke from a list of gesture points. 47 * @param points 49 public GestureStroke(ArrayList<GesturePoint> points) { argument 50 final int count = points.size(); 59 final GesturePoint p = points.get(i); 79 this.points = tmpPoints; 90 points = pts.clone(); 96 return new GestureStroke(boundingBox, length, points, timestamp [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/view/ |
H A D | RectShadowPainter.java | 96 int points = 0; 97 // left-bottom points 99 ret[points][0] = (float) (left - radius + radius * Math.cos(RADIANS_STEP * i)); 100 ret[points][1] = (float) (bottom + radius - radius * Math.cos(RADIANS_STEP * i)); 101 ret[points][2] = elevation; 102 points++; 104 // left-top points 106 ret[points][0] = (float) (left + radius - radius * Math.cos(RADIANS_STEP * i)); 107 ret[points][1] = (float) (top + radius - radius * Math.cos(RADIANS_STEP * i)); 108 ret[points][ [all...] |
/frameworks/base/libs/hwui/ |
H A D | SpotShadow.h | 40 static void computeLightPolygon(int points, const Vector3& lightCenter, 47 static void xsort(Vector2* points, int pointsLength); 48 static int hull(Vector2* points, int pointsLength, Vector2* retPoly); 52 static void swap(Vector2* points, int i, int j); 53 static void quicksortCirc(Vector2* points, int low, int high, const Vector2& center); 54 static void quicksortX(Vector2* points, int low, int high);
|
H A D | PathParser.cpp | 187 std::vector<float> points; local 188 getFloats(&points, result, pathStr, start, end); 194 // If either verb or points is not valid, return immediately. 199 data->verbSizes.push_back(points.size()); 200 data->points.insert(data->points.end(), points.begin(), points.end()); 225 os << " " << data.points[start + j]; 232 for (size_t i = 0; i < data.points [all...] |
H A D | PathTessellator.h | 81 * Populates a VertexBuffer with a tessellated approximation of points as a single triangle 84 * @param points The center vertices of the points to be drawn 86 * @param paint The paint the points will be drawn with indicating AA, stroke width & cap 87 * @param transform The transform the points will be drawn with, used to drive stretch-aware path 91 static void tessellatePoints(const float* points, int count, const SkPaint* paint, 98 * @param points Pairs of endpoints defining the lines to be drawn 101 * @param transform The transform the points will be drawn with, used to drive stretch-aware path 105 static void tessellateLines(const float* points, int count, const SkPaint* paint,
|
H A D | SpotShadow.cpp | 107 * Calculate the intersection of a ray with the line segment defined by two points. 141 * Sort points by their X coordinates 143 * @param points the points as a Vector2 array. 146 void SpotShadow::xsort(Vector2* points, int pointsLength) { argument 150 std::sort(points, points + pointsLength, cmp); 156 * @param points the points as a Vector2 array. 159 * @return the number of points i 161 hull(Vector2* points, int pointsLength, Vector2* retPoly) argument 245 swap(Vector2* points, int i, int j) argument 254 quicksortCirc(Vector2* points, int low, int high, const Vector2& center) argument 329 computeLightPolygon(int points, const Vector3& lightCenter, float size, Vector3* ret) argument [all...] |
H A D | RecordedOp.h | 280 LinesOp(BASE_PARAMS, const float* points, const int floatCount) argument 282 , points(points) 284 const float* points; member in struct:android::uirenderer::LinesOp 310 PointsOp(BASE_PARAMS, const float* points, const int floatCount) argument 312 , points(points) 314 const float* points; member in struct:android::uirenderer::PointsOp
|
H A D | PathTessellator.cpp | 155 // always use 2 points for hairline 165 * Outset the bounds of point data (for line endpoints or points) to account for stroke 188 // zig zag between all previous points on the inside of the hull to create a 351 // generate alpha points - fill Alpha vertex gaps in between each point with 384 // zig zag between all previous points on the inside of the hull to create a 487 //copy most recent two points to first two points 551 * 'middlePts' is (number of points in the unclosed input vertex list, minus 2) times two 794 const float* points, int count, Rect& bounds) { 795 bounds.set(points[ 793 instanceVertices(VertexBuffer& srcBuffer, VertexBuffer& dstBuffer, const float* points, int count, Rect& bounds) argument 808 tessellatePoints(const float* points, int count, const SkPaint* paint, const mat4& transform, VertexBuffer& vertexBuffer) argument 849 tessellateLines(const float* points, int count, const SkPaint* paint, const mat4& transform, VertexBuffer& vertexBuffer) argument [all...] |
H A D | RecordingCanvas.h | 152 float points[2] = { x, y }; variable 153 drawPoints(points, 2, paint); 155 virtual void drawPoints(const float* points, int floatCount, const SkPaint& paint) override; 158 float points[4] = { startX, startY, stopX, stopY }; variable 159 drawLines(points, 4, paint); 161 virtual void drawLines(const float* points, int floatCount, const SkPaint& paint) override; 230 // The points/verbs within the path are refcounted so this copy operation
|
H A D | RecordingCanvas.cpp | 261 static Rect calcBoundsOfPoints(const float* points, int floatCount) { argument 262 Rect unmappedBounds(points[0], points[1], points[0], points[1]); 264 unmappedBounds.expandToCover(points[i], points[i + 1]); 270 void RecordingCanvas::drawPoints(const float* points, int floatCount, const SkPaint& paint) { argument 275 calcBoundsOfPoints(points, floatCount), 278 refPaint(&paint), refBuffer<float>(points, floatCoun 281 drawLines(const float* points, int floatCount, const SkPaint& paint) argument [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
H A D | PathMeasure_Delegate.java | 172 float[] points = new float[6]; 176 int type = iterator.currentSegment(points, stopD - accLength); 194 Path_Delegate.nMoveTo(native_dst_path, points[0], points[1]); 197 Path_Delegate.nLineTo(native_dst_path, points[0], points[1]); 203 Path_Delegate.nCubicTo(native_dst_path, points[0], points[1], 204 points[2], points[ [all...] |
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/shadowutil/ |
H A D | SpotShadow.java | 104 * @param points The vertices coordinates of polygon 107 * @return The number of points in the retPolygon 109 private static int hull(@NonNull float[] points, int pointsLength, @NonNull float[] retPoly) { argument 110 quicksortX(points, 0, pointsLength - 1); 113 lUpper[0] = points[0]; 114 lUpper[1] = points[1]; 115 lUpper[2] = points[2]; 116 lUpper[3] = points[3]; 121 lUpper[lUpperSize * 2 + 0] = points[i * 2 + 0]; 122 lUpper[lUpperSize * 2 + 1] = points[ 287 swapPair(@onNull float[] points, int i, int j) argument 296 quicksortCircle(@onNull float[] points, int low, int high, @NonNull float[] ctr) argument 330 quicksortX(@onNull float[] points, int low, int high) argument 431 calculateLight(float size, int points, float x, float y, float height) argument [all...] |
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/ |
H A D | AccessPointTest.java | 176 ArrayList<AccessPoint> points = new ArrayList<AccessPoint>(); 177 points.add(lastname); 178 points.add(firstName); 179 points.add(highLevelAndReachable); 180 points.add(saved); 181 points.add(reachableAndMinLevel); 182 points.add(active); 184 Collections.sort(points); 185 assertThat(points.indexOf(active)).isLessThan(points [all...] |
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/geometry/ |
H A D | Quad.java | 27 * A Quad instance holds 4 points that define its shape. The points may represent any rectangle that 84 * Return a Quad that spans the specified points and height. 86 * The returned Quad has the specified top-left and top-right points, and the specified height 92 * @return Quad that spans the specified points and height. 137 // We only use the first 3 points as they sufficiently specify the transform 205 float[] points = asCoords(); 206 matrix.mapPoints(points); 207 return new Quad(points); 241 * This method moves the corner points o 333 Quad(float[] points) argument [all...] |
/frameworks/base/core/jni/android/graphics/ |
H A D | Path.cpp | 239 typedef SkPoint (*bezierCalculation)(float t, const SkPoint* points); 274 static SkPoint cubicBezierCalculation(float t, const SkPoint* points) { argument 275 float x = cubicCoordinateCalculation(t, points[0].x(), points[1].x(), 276 points[2].x(), points[3].x()); 277 float y = cubicCoordinateCalculation(t, points[0].y(), points[1].y(), 278 points[2].y(), points[ 287 quadraticBezierCalculation(float t, const SkPoint* points) argument 295 subdividePoints(const SkPoint* points, bezierCalculation bezierFunction, float t0, const SkPoint &p0, float t1, const SkPoint &p1, float& midT, SkPoint &midPoint, float errorSquared) argument 316 addBezier(const SkPoint* points, bezierCalculation bezierFunction, std::vector<SkPoint>& segmentPoints, std::vector<float>& lengths, float errorSquared, bool doubleCheckDivision) argument 359 createVerbSegments(const SkPath::Iter& pathIter, SkPath::Verb verb, const SkPoint* points, std::vector<SkPoint>& segmentPoints, std::vector<float>& lengths, float errorSquared, float errorConic) argument 418 SkPoint points[4]; local [all...] |
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ |
H A D | CachedPathIteratorFactory.java | 38 * float arrays store always points where the first element is X and the second is Y. 55 float[] points = new float[6]; 57 int type = iterator.currentSegment(points); 62 System.arraycopy(points, 0, itemPoints, 0, nPoints); 156 // Calculate the points at t0 and t1 for the quadratic curves formed by (P0, P1, P2) and 198 * Returns the number of points stored in a coordinates array for the given segment type. 290 * Stores the coordinates array of the current segment. The number of points stored depends 350 float[] points = new float[8]; 353 points[0] = points[ [all...] |
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/ |
H A D | BatteryInfo.java | 51 SparseIntArray points = new SparseIntArray(); 63 points.put((int) time, record.batteryLevel); 68 if (points.size() > 1) { 69 view.addPath(points); 71 points.clear(); 76 if (points.size() > 1) { 77 view.addPath(points);
|
/frameworks/rs/script_api/ |
H A D | rs_vector_math.spec | 70 summary: Distance between two points 72 Compute the distance between two points. 122 summary: Approximate distance between two points 124 Computes the approximate distance between two points. 205 summary: Approximate distance between two points 207 Computes the approximate distance between two points.
|
/frameworks/base/libs/hwui/tests/unit/ |
H A D | VectorDrawableTests.cpp | 191 // Extreme case with numbers and decimal points crunched together 331 for (size_t i = 0; i < toPathData.points.size(); i++) { 332 toPathData.points[i]++; 341 for (size_t i = 0; i < outData.points.size(); i++) { 342 float expectedResult = fromPathData.points[i] * (1.0 - fraction) + 343 toPathData.points[i] * fraction; 344 EXPECT_TRUE(MathUtils::areEqual(expectedResult, outData.points[i]));
|
H A D | BakedOpDispatcherTests.cpp | 144 const float points[4] = {0.5, 0.5, 1.0, 1.0}; local 145 PointsOp antiAliasedPointsOp(bounds, Matrix4::identity(), nullptr, &aaPaint, points, 4); 147 << "Expect no offset for AA points."; 148 PointsOp pointsOp(bounds, Matrix4::identity(), nullptr, &paint, points, 4); 150 << "Expect an offset for non-AA points."; 152 LinesOp antiAliasedLinesOp(bounds, Matrix4::identity(), nullptr, &aaPaint, points, 4); 155 LinesOp linesOp(bounds, Matrix4::identity(), nullptr, &paint, points, 4);
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/ |
H A D | UsageGraph.java | 117 public void addPath(SparseIntArray points) { argument 118 for (int i = 0; i < points.size(); i++) { 119 mPaths.put(points.keyAt(i), points.valueAt(i)); 121 mPaths.put(points.keyAt(points.size() - 1) + 1, PATH_DELIM); 159 // Clear out any pending points.
|
H A D | UsageView.java | 90 public void addPath(SparseIntArray points) { argument 91 mUsageGraph.addPath(points);
|
/frameworks/base/media/mca/filterfw/native/core/ |
H A D | geometry.h | 64 const std::vector<Point>& points() const { return points_; } function in class:android::filterfw::Quad
|