Searched refs:points (Results 1 - 25 of 33) sorted by relevance

12

/frameworks/base/libs/hwui/utils/
H A DVectorDrawableUtils.cpp35 void addCommand(SkPath* outPath, char previousCmd, char cmd, const std::vector<float>* points,
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;
99 // Use the given verb, and points in the range [start, end) to insert a command into the SkPath.
101 const std::vector<float>* points, size_
100 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 DGestureUtils.java141 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 DGestureStroke.java31 * 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/libs/hwui/
H A DSpotShadow.h40 static void computeLightPolygon(int points, const Vector3& lightCenter, float size,
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 DPathParser.cpp159 void PathParser::validateVerbAndPoints(char verb, size_t points, PathParser::ParseResult* result) { argument
200 if (numberOfPointsExpected == 0 && points == 0) {
203 if (numberOfPointsExpected > 0 && points % numberOfPointsExpected == 0) {
214 + " floats. However, " + std::to_string(points)
240 std::vector<float> points; local
241 getFloats(&points, result, pathStr, start, end);
242 validateVerbAndPoints(pathStr[start], points.size(), result);
244 // If either verb or points is not valid, return immediately.
250 data->verbSizes.push_back(points.size());
251 data->points
[all...]
H A DPathParser.h46 static void validateVerbAndPoints(char verb, size_t points, ParseResult* result);
H A DPathTessellator.h81 * 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
92 static void tessellatePoints(const float* points, int count, const SkPaint* paint,
99 * @param points Pairs of endpoints defining the lines to be drawn
102 * @param transform The transform the points will be drawn with, used to drive stretch-aware
107 static void tessellateLines(const float* points, int count, const SkPaint* paint,
H A DSpotShadow.cpp107 * Calculate the intersection of a ray with the line segment defined by two points.
142 * Sort points by their X coordinates
144 * @param points the points as a Vector2 array.
147 void SpotShadow::xsort(Vector2* points, int pointsLength) { argument
149 std::sort(points, points + pointsLength, cmp);
155 * @param points the points as a Vector2 array.
158 * @return the number of points i
160 hull(Vector2* points, int pointsLength, Vector2* retPoly) argument
241 swap(Vector2* points, int i, int j) argument
250 quicksortCirc(Vector2* points, int low, int high, const Vector2& center) argument
322 computeLightPolygon(int points, const Vector3& lightCenter, float size, Vector3* ret) argument
[all...]
H A DRecordedOp.h273 LinesOp(BASE_PARAMS, const float* points, const int floatCount) argument
274 : SUPER(LinesOp), points(points), floatCount(floatCount) {}
275 const float* points; member in struct:android::uirenderer::LinesOp
296 PointsOp(BASE_PARAMS, const float* points, const int floatCount) argument
297 : SUPER(PointsOp), points(points), floatCount(floatCount) {}
298 const float* points; member in struct:android::uirenderer::PointsOp
H A DPathTessellator.cpp157 // always use 2 points for hairline
167 * Outset the bounds of point data (for line endpoints or points) to account for stroke
190 // zig zag between all previous points on the inside of the hull to create a
350 // generate alpha points - fill Alpha vertex gaps in between each point with
380 // zig zag between all previous points on the inside of the hull to create a
472 // copy most recent two points to first two points
536 * 'middlePts' is (number of points in the unclosed input vertex list, minus 2) times two
753 static void instanceVertices(VertexBuffer& srcBuffer, VertexBuffer& dstBuffer, const float* points, argument
755 bounds.set(points[
768 tessellatePoints(const float* points, int count, const SkPaint* paint, const mat4& transform, VertexBuffer& vertexBuffer) argument
809 tessellateLines(const float* points, int count, const SkPaint* paint, const mat4& transform, VertexBuffer& vertexBuffer) argument
[all...]
H A DRecordingCanvas.h147 float points[2] = {x, y}; variable
148 drawPoints(points, 2, paint);
150 virtual void drawPoints(const float* points, int floatCount, const SkPaint& paint) override;
153 float points[4] = {startX, startY, stopX, stopY}; variable
154 drawLines(points, 4, paint);
156 virtual void drawLines(const float* points, int floatCount, const SkPaint& paint) override;
227 // The points/verbs within the path are refcounted so this copy operation
H A DRecordingCanvas.cpp250 static Rect calcBoundsOfPoints(const float* points, int floatCount) { argument
251 Rect unmappedBounds(points[0], points[1], points[0], points[1]);
253 unmappedBounds.expandToCover(points[i], points[i + 1]);
259 void RecordingCanvas::drawPoints(const float* points, int floatCount, const SkPaint& paint) { argument
264 calcBoundsOfPoints(points, floatCount), *mState.currentSnapshot()->transform,
265 getRecordedClip(), refPaint(&paint), refBuffer<float>(points, floatCoun
268 drawLines(const float* points, int floatCount, const SkPaint& paint) argument
[all...]
H A DSkiaCanvas.h99 virtual void drawPoints(const float* points, int count, const SkPaint& paint) override;
102 virtual void drawLines(const float* points, int count, const SkPaint& paint) override;
175 void drawPoints(const float* points, int count, const SkPaint& paint, SkCanvas::PointMode mode);
H A DSkiaCanvas.cpp458 void SkiaCanvas::drawPoints(const float* points, int count, const SkPaint& paint, argument
462 count >>= 1; // now it is the number of points
465 pts[i].set(points[0], points[1]);
466 points += 2;
475 void SkiaCanvas::drawPoints(const float* points, int count, const SkPaint& paint) { argument
476 this->drawPoints(points, count, paint, SkCanvas::kPoints_PointMode);
484 void SkiaCanvas::drawLines(const float* points, int count, const SkPaint& paint) { argument
486 this->drawPoints(points, count, paint, SkCanvas::kLines_PointMode);
/frameworks/layoutlib/bridge/src/android/graphics/
H A DPathMeasure_Delegate.java172 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/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/geometry/
H A DQuad.java27 * 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 DPath.cpp242 typedef SkPoint (*bezierCalculation)(float t, const SkPoint* points);
277 static SkPoint cubicBezierCalculation(float t, const SkPoint* points) { argument
278 float x = cubicCoordinateCalculation(t, points[0].x(), points[1].x(),
279 points[2].x(), points[3].x());
280 float y = cubicCoordinateCalculation(t, points[0].y(), points[1].y(),
281 points[2].y(), points[
290 quadraticBezierCalculation(float t, const SkPoint* points) argument
298 subdividePoints(const SkPoint* points, bezierCalculation bezierFunction, float t0, const SkPoint &p0, float t1, const SkPoint &p1, float& midT, SkPoint &midPoint, float errorSquared) argument
319 addBezier(const SkPoint* points, bezierCalculation bezierFunction, std::vector<SkPoint>& segmentPoints, std::vector<float>& lengths, float errorSquared, bool doubleCheckDivision) argument
362 createVerbSegments(const SkPath::Iter& pathIter, SkPath::Verb verb, const SkPoint* points, std::vector<SkPoint>& segmentPoints, std::vector<float>& lengths, float errorSquared, float errorConic) argument
421 SkPoint points[4]; local
[all...]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/util/
H A DCachedPathIteratorFactory.java38 * 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/tests/integ/src/com/android/settingslib/wifi/
H A DAccessPointTest.java205 ArrayList<AccessPoint> points = new ArrayList<AccessPoint>();
206 points.add(lastname);
207 points.add(firstName);
208 points.add(highLevelAndReachable);
209 points.add(saved);
210 points.add(reachableAndMinLevel);
211 points.add(active);
213 Collections.sort(points);
214 assertThat(points.indexOf(active)).isLessThan(points
[all...]
/frameworks/rs/script_api/
H A Drs_vector_math.spec70 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 DVectorDrawableTests.cpp200 // Extreme case with numbers and decimal points crunched together
336 for (size_t i = 0; i < toPathData.points.size(); i++) {
337 toPathData.points[i]++;
346 for (size_t i = 0; i < outData.points.size(); i++) {
348 fromPathData.points[i] * (1.0 - fraction) + toPathData.points[i] * fraction;
349 EXPECT_TRUE(MathUtils::areEqual(expectedResult, outData.points[i]));
H A DBakedOpDispatcherTests.cpp145 const float points[4] = {0.5, 0.5, 1.0, 1.0}; local
146 PointsOp antiAliasedPointsOp(bounds, Matrix4::identity(), nullptr, &aaPaint, points, 4);
148 << "Expect no offset for AA points.";
149 PointsOp pointsOp(bounds, Matrix4::identity(), nullptr, &paint, points, 4);
151 << "Expect an offset for non-AA points.";
153 LinesOp antiAliasedLinesOp(bounds, Matrix4::identity(), nullptr, &aaPaint, points, 4);
156 LinesOp linesOp(bounds, Matrix4::identity(), nullptr, &paint, points, 4);
/frameworks/base/media/mca/filterfw/native/core/
H A Dgeometry.h64 const std::vector<Point>& points() const { return points_; } function in class:android::filterfw::Quad
/frameworks/base/media/mca/filterpacks/native/base/
H A Dgeometry.h64 const std::vector<Point>& points() const { return points_; } function in class:android::filterfw::Quad
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
H A DMotionEventInjectorTest.java697 boolean continued, long interval, Point... points) {
698 List<GestureStep> gesture = new ArrayList<>(points.length);
701 for (int i = 0; i < points.length; i++) {
702 touchPoints[0].mX = points[i].x;
703 touchPoints[0].mY = points[i].y;
707 touchPoints[0].mIsEndOfPath = ((i == points.length - 1) && !continued);
823 private static TypeSafeMatcher<MotionEvent> containsPoints(final Point... points) { argument
828 for (int i = 0; i < points.length; i++) {
830 for (int j = 0; j < points.length; j++) {
832 if ((points[
696 createSimpleGestureFromPoints(int strokeId, int continuedStrokeId, boolean continued, long interval, Point... points) argument
[all...]

Completed in 465 milliseconds

12