Home
last modified time | relevance | path

Searched refs:SkPoint (Results 1 – 25 of 940) sorted by relevance

12345678910>>...38

/external/skia/tests/
DPolyUtilsTest.cpp19 SkTDArray<SkPoint> poly; in DEF_TEST()
28 *poly.append() = SkPoint::Make(-100, 55); in DEF_TEST()
29 *poly.append() = SkPoint::Make(100, 55); in DEF_TEST()
30 *poly.append() = SkPoint::Make(102.5f, 54.330127f); in DEF_TEST()
93 *poly.append() = SkPoint::Make(-100, 55); in DEF_TEST()
94 *poly.append() = SkPoint::Make(100, 55); in DEF_TEST()
95 *poly.append() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST()
96 *poly.append() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST()
97 *poly.append() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST()
98 *poly.append() = SkPoint::Make(105, 50); in DEF_TEST()
[all …]
DOffsetSimplePolyTest.cpp16 SkTDArray<SkPoint> rrectPoly; in DEF_TEST()
22 *rrectPoly.append() = SkPoint::Make(-100, 55); in DEF_TEST()
23 *rrectPoly.append() = SkPoint::Make(100, 55); in DEF_TEST()
24 *rrectPoly.append() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST()
25 *rrectPoly.append() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST()
26 *rrectPoly.append() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST()
27 *rrectPoly.append() = SkPoint::Make(105, 50); in DEF_TEST()
28 *rrectPoly.append() = SkPoint::Make(105, -50); in DEF_TEST()
29 *rrectPoly.append() = SkPoint::Make(100 + 4.330127f, -50 - 2.5f); in DEF_TEST()
30 *rrectPoly.append() = SkPoint::Make(100 + 3.535534f, -50 - 3.535534f); in DEF_TEST()
[all …]
DInsetConvexPolyTest.cpp15 SkTDArray<SkPoint> rrectPoly; in DEF_TEST()
18 *rrectPoly.append() = SkPoint::Make(-100, 55); in DEF_TEST()
19 *rrectPoly.append() = SkPoint::Make(100, 55); in DEF_TEST()
20 *rrectPoly.append() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST()
21 *rrectPoly.append() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST()
22 *rrectPoly.append() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST()
23 *rrectPoly.append() = SkPoint::Make(105, 50); in DEF_TEST()
24 *rrectPoly.append() = SkPoint::Make(105, -50); in DEF_TEST()
25 *rrectPoly.append() = SkPoint::Make(100 + 4.330127f, -50 - 2.5f); in DEF_TEST()
26 *rrectPoly.append() = SkPoint::Make(100 + 3.535534f, -50 - 3.535534f); in DEF_TEST()
[all …]
DGeometryTest.cpp25 static bool nearly_equal(const SkPoint& a, const SkPoint& b) { in nearly_equal()
35 const SkPoint src[] = { in testChopCubic()
41 SkPoint dst[13]; in testChopCubic()
50 SkPoint pts[7]; in testChopCubic()
74 SkPoint pts[4] = {{rand.nextF(), rand.nextF()}, {rand.nextF(), rand.nextF()}, in testChopCubic()
77 SkPoint allChops[4 + std::size(chopTs)*3]; in testChopCubic()
82 SkPoint expectedPt; in testChopCubic()
95 SkPoint localChops[10]; in testChopCubic()
117 SkPoint oneChops[4 + std::size(ones)*3]; in testChopCubic()
141 SkPoint pts[3]; in test_evalquadat()
[all …]
DWangsFormulaTest.cpp28 const SkPoint kSerp[4] = {
31 const SkPoint kLoop[4] = {
34 const SkPoint kQuad[4] = {
37 static float wangs_formula_quadratic_reference_impl(float precision, const SkPoint p[3]) { in wangs_formula_quadratic_reference_impl()
42 static float wangs_formula_cubic_reference_impl(float precision, const SkPoint p[4]) { in wangs_formula_cubic_reference_impl()
57 const SkPoint P[3], in wangs_formula_conic_reference_impl()
68 const SkPoint C = SkPoint::Make(0.5f * (min_x + max_x), 0.5f * (min_y + max_y)); in wangs_formula_conic_reference_impl()
71 SkPoint tP[3] = {P[0] - C, P[1] - C, P[2] - C}; in wangs_formula_conic_reference_impl()
116 std::function<void(const SkPoint[])> f, in for_random_beziers()
119 SkPoint pts[4]; in for_random_beziers()
[all …]
/external/skia/gm/
Ddegeneratesegments.cpp37 typedef SkPoint (*AddSegmentFunc)(SkPathBuilder&, SkPoint&);
42 static SkPoint AddMove(SkPathBuilder& path, SkPoint& startPt) { in AddMove()
43 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMove()
48 static SkPoint AddMoveClose(SkPathBuilder& path, SkPoint& startPt) { in AddMoveClose()
49 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveClose()
55 static SkPoint AddDegenLine(SkPathBuilder& path, SkPoint& startPt) { in AddDegenLine()
60 static SkPoint AddMoveDegenLine(SkPathBuilder& path, SkPoint& startPt) { in AddMoveDegenLine()
61 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLine()
67 static SkPoint AddMoveDegenLineClose(SkPathBuilder& path, SkPoint& startPt) { in AddMoveDegenLineClose()
68 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLineClose()
[all …]
Dpolygonoffset.cpp27 static void create_ngon(int n, SkPoint* pts, SkScalar w, SkScalar h, SkPathDirection dir) { in create_ngon()
46 const SkPoint gPoints0[] = {
53 const SkPoint gPoints1[] = {
60 const SkPoint gPoints2[] = {
67 const SkPoint gPoints3[] = {
74 const SkPoint gPoints4[] = {
84 const SkPoint gPoints5[] = {
91 const SkPoint gPoints6[] = {
98 const SkPoint gPoints7[] = {
108 const SkPoint gPoints8[] = {
[all …]
/external/skia/src/core/
DSkGeometry.h21 static inline skvx::float2 from_point(const SkPoint& point) { in from_point()
25 static inline SkPoint to_point(const skvx::float2& x) { in to_point()
26 SkPoint point; in to_point()
51 SkPoint SkEvalQuadAt(const SkPoint src[3], SkScalar t);
52 SkPoint SkEvalQuadTangentAt(const SkPoint src[3], SkScalar t);
57 void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, SkVector* tangent = nullptr);
63 void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t);
68 void SkChopQuadAtHalf(const SkPoint src[3], SkPoint dst[5]);
78 inline float SkMeasureQuadRotation(const SkPoint pts[3]) { in SkMeasureQuadRotation()
85 float SkFindQuadMidTangent(const SkPoint src[3]);
[all …]
DSkPointPriv.h22 static bool AreFinite(const SkPoint array[], int count) { in AreFinite()
26 static const SkScalar* AsScalars(const SkPoint& pt) { return &pt.fX; } in AsScalars()
32 static SkScalar DistanceToLineBetweenSqd(const SkPoint& pt, const SkPoint& a,
33 const SkPoint& b, Side* side = nullptr);
35 static SkScalar DistanceToLineBetween(const SkPoint& pt, const SkPoint& a,
36 const SkPoint& b, Side* side = nullptr) {
40 static SkScalar DistanceToLineSegmentBetweenSqd(const SkPoint& pt, const SkPoint& a,
41 const SkPoint& b);
43 static SkScalar DistanceToLineSegmentBetween(const SkPoint& pt, const SkPoint& a, in DistanceToLineSegmentBetween()
44 const SkPoint& b) { in DistanceToLineSegmentBetween()
[all …]
DSkEdgeClipper.h26 bool clipLine(SkPoint p0, SkPoint p1, const SkRect& clip);
27 bool clipQuad(const SkPoint pts[3], const SkRect& clip);
28 bool clipCubic(const SkPoint pts[4], const SkRect& clip);
30 SkPath::Verb next(SkPoint pts[]);
42 SkPoint* fCurrPoint;
50 SkPoint fPoints[kMaxPoints];
53 void clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip);
54 void clipMonoCubic(const SkPoint srcPts[4], const SkRect& clip);
55 void appendLine(SkPoint p0, SkPoint p1);
57 void appendQuad(const SkPoint pts[3], bool reverse);
[all …]
DSkStroke.cpp93 static bool set_normal_unitnormal(const SkPoint& before, const SkPoint& after, SkScalar scale, in set_normal_unitnormal()
119 SkPoint fQuad[3]; // the stroked quad parallel to the original curve
120 SkPoint fTangentStart; // a point tangent to fQuad[0]
121 SkPoint fTangentEnd; // a point tangent to fQuad[2]
167 SkPoint moveToPt() const { return fFirstPt; } in moveToPt()
169 void moveTo(const SkPoint&);
170 void lineTo(const SkPoint&, const SkPath::Iter* iter = nullptr);
171 void quadTo(const SkPoint&, const SkPoint&);
172 void conicTo(const SkPoint&, const SkPoint&, SkScalar weight);
173 void cubicTo(const SkPoint&, const SkPoint&, const SkPoint&);
[all …]
DSkPathMakers.h21 const SkPoint& current() const { in current()
26 const SkPoint& next() { in next()
32 SkPoint fPts[N];
44 fPts[0] = SkPoint::Make(rect.fLeft, rect.fTop); in SkPath_RectPointIterator()
45 fPts[1] = SkPoint::Make(rect.fRight, rect.fTop); in SkPath_RectPointIterator()
46 fPts[2] = SkPoint::Make(rect.fRight, rect.fBottom); in SkPath_RectPointIterator()
47 fPts[3] = SkPoint::Make(rect.fLeft, rect.fBottom); in SkPath_RectPointIterator()
59 fPts[0] = SkPoint::Make(cx, oval.fTop); in SkPath_OvalPointIterator()
60 fPts[1] = SkPoint::Make(oval.fRight, cy); in SkPath_OvalPointIterator()
61 fPts[2] = SkPoint::Make(cx, oval.fBottom); in SkPath_OvalPointIterator()
[all …]
DSkQuadClipper.h26 bool clipQuad(const SkPoint src[3], SkPoint dst[3]);
38 bool clipQuad(const SkPoint pts[3], const SkRect& clip);
39 bool clipCubic(const SkPoint pts[4], const SkRect& clip);
41 SkPath::Verb next(SkPoint pts[]);
44 SkPoint* fCurrPoint;
51 SkPoint fPoints[kMaxPoints];
54 void clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip);
55 void clipMonoCubic(const SkPoint srcPts[4], const SkRect& clip);
57 void appendQuad(const SkPoint pts[3], bool reverse);
58 void appendCubic(const SkPoint pts[4], bool reverse);
[all …]
DSkPoint.cpp18 void SkPoint::scale(SkScalar scale, SkPoint* dst) const { in scale()
23 bool SkPoint::normalize() { in normalize()
27 bool SkPoint::setNormalize(SkScalar x, SkScalar y) { in setNormalize()
31 bool SkPoint::setLength(SkScalar length) { in setLength()
43 template <bool use_rsqrt> bool set_point_length(SkPoint* pt, float x, float y, float length, in set_point_length()
72 SkScalar SkPoint::Normalize(SkPoint* pt) { in Normalize()
80 SkScalar SkPoint::Length(SkScalar dx, SkScalar dy) { in Length()
91 bool SkPoint::setLength(float x, float y, float length) { in setLength()
95 bool SkPointPriv::SetLengthFast(SkPoint* pt, float length) { in SetLengthFast()
102 SkScalar SkPointPriv::DistanceToLineBetweenSqd(const SkPoint& pt, const SkPoint& a, in DistanceToLineBetweenSqd()
[all …]
DSkPathBuilder.cpp94 SkPathBuilder& SkPathBuilder::moveTo(SkPoint pt) { in moveTo()
106 SkPathBuilder& SkPathBuilder::lineTo(SkPoint pt) { in lineTo()
116 SkPathBuilder& SkPathBuilder::quadTo(SkPoint pt1, SkPoint pt2) { in quadTo()
119 SkPoint* p = fPts.push_back_n(2); in quadTo()
128 SkPathBuilder& SkPathBuilder::conicTo(SkPoint pt1, SkPoint pt2, SkScalar w) { in conicTo()
131 SkPoint* p = fPts.push_back_n(2); in conicTo()
141 SkPathBuilder& SkPathBuilder::cubicTo(SkPoint pt1, SkPoint pt2, SkPoint pt3) { in cubicTo()
144 SkPoint* p = fPts.push_back_n(3); in cubicTo()
168 SkPathBuilder& SkPathBuilder::rLineTo(SkPoint p1) { in rLineTo()
173 SkPathBuilder& SkPathBuilder::rQuadTo(SkPoint p1, SkPoint p2) { in rQuadTo()
[all …]
/external/skia/src/gpu/ganesh/geometry/
DGrPathUtils.h43 uint32_t quadraticPointCount(const SkPoint points[], SkScalar tol);
46 uint32_t generateQuadraticPoints(const SkPoint& p0,
47 const SkPoint& p1,
48 const SkPoint& p2,
50 SkPoint** points,
56 uint32_t cubicPointCount(const SkPoint points[], SkScalar tol);
59 uint32_t generateCubicPoints(const SkPoint& p0,
60 const SkPoint& p1,
61 const SkPoint& p2,
62 const SkPoint& p3,
[all …]
DGrPathUtils.cpp66 uint32_t GrPathUtils::quadraticPointCount(const SkPoint points[], SkScalar tol) { in quadraticPointCount()
71 uint32_t GrPathUtils::generateQuadraticPoints(const SkPoint& p0, in generateQuadraticPoints()
72 const SkPoint& p1, in generateQuadraticPoints()
73 const SkPoint& p2, in generateQuadraticPoints()
75 SkPoint** points, in generateQuadraticPoints()
84 SkPoint q[] = { in generateQuadraticPoints()
88 SkPoint r = { SkScalarAve(q[0].fX, q[1].fX), SkScalarAve(q[0].fY, q[1].fY) }; in generateQuadraticPoints()
96 uint32_t GrPathUtils::cubicPointCount(const SkPoint points[], SkScalar tol) { in cubicPointCount()
101 uint32_t GrPathUtils::generateCubicPoints(const SkPoint& p0, in generateCubicPoints()
102 const SkPoint& p1, in generateCubicPoints()
[all …]
/external/skia/include/core/
DSkPathBuilder.h47 SkPathBuilder& moveTo(SkPoint pt);
48 SkPathBuilder& moveTo(SkScalar x, SkScalar y) { return this->moveTo(SkPoint::Make(x, y)); } in moveTo()
50 SkPathBuilder& lineTo(SkPoint pt);
51 SkPathBuilder& lineTo(SkScalar x, SkScalar y) { return this->lineTo(SkPoint::Make(x, y)); } in lineTo()
53 SkPathBuilder& quadTo(SkPoint pt1, SkPoint pt2);
55 return this->quadTo(SkPoint::Make(x1, y1), SkPoint::Make(x2, y2)); in quadTo()
57 SkPathBuilder& quadTo(const SkPoint pts[2]) { return this->quadTo(pts[0], pts[1]); } in quadTo()
59 SkPathBuilder& conicTo(SkPoint pt1, SkPoint pt2, SkScalar w);
61 return this->conicTo(SkPoint::Make(x1, y1), SkPoint::Make(x2, y2), w); in conicTo()
63 SkPathBuilder& conicTo(const SkPoint pts[2], SkScalar w) { in conicTo()
[all …]
DSkPath.h78 static SkPath Make(const SkPoint[], int pointCount,
94 static SkPath Polygon(const SkPoint pts[], int count, bool isClosed,
98 static SkPath Polygon(const std::initializer_list<SkPoint>& list, bool isClosed,
104 static SkPath Line(const SkPoint a, const SkPoint b) { in Line()
365 static bool IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact);
378 static bool IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2,
379 const SkPoint& p3, bool exact);
393 static bool IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2,
394 const SkPoint& p3, const SkPoint& p4, bool exact);
407 bool isLine(SkPoint line[2]) const;
[all …]
/external/skia/src/pathops/
DSkPathOpsCurve.h26 SkPoint fPts[4];
30 const SkPoint& operator[](int n) const {
74 SkDPoint conicTop(const SkPoint curve[3], SkScalar curveWeight,
76 SkDPoint cubicTop(const SkPoint curve[4], SkScalar , double s, double e, double* topT);
79 SkDPoint lineTop(const SkPoint[2], SkScalar , double , double , double* topT);
81 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, double* topT);
83 void setConicBounds(const SkPoint curve[3], SkScalar curveWeight,
85 void setCubicBounds(const SkPoint curve[4], SkScalar ,
87 void setQuadBounds(const SkPoint curve[3], SkScalar ,
105 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeight,
[all …]
DSkOpContour.cpp46 void SkOpContourBuilder::addConic(SkPoint pts[3], SkScalar weight) { in addConic()
51 void SkOpContourBuilder::addCubic(SkPoint pts[4]) { in addCubic()
56 void SkOpContourBuilder::addCurve(SkPath::Verb verb, const SkPoint pts[4], SkScalar weight) { in addCurve()
64 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve()
65 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve()
69 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve()
70 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve()
74 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(4); in addCurve()
75 memcpy(ptStorage, pts, sizeof(SkPoint) * 4); in addCurve()
83 void SkOpContourBuilder::addLine(const SkPoint pts[2]) { in addLine()
[all …]
/external/skia/src/utils/
DSkPatchUtils.h18 struct SkPoint;
33 static void GetTopCubic(const SkPoint cubics[12], SkPoint points[4]);
38 static void GetBottomCubic(const SkPoint cubics[12], SkPoint points[4]);
43 static void GetLeftCubic(const SkPoint cubics[12], SkPoint points[4]);
48 static void GetRightCubic(const SkPoint cubics[12], SkPoint points[4]);
53 static SkISize GetLevelOfDetail(const SkPoint cubics[12], const SkMatrix* matrix);
55 static sk_sp<SkVertices> MakeVertices(const SkPoint cubics[12], const SkColor colors[4],
56 const SkPoint texCoords[4], int lodX, int lodY,
DSkShadowTessellator.cpp67 bool accumulateCentroid(const SkPoint& c, const SkPoint& n);
68 bool checkConvexity(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2);
74 bool clipUmbraPoint(const SkPoint& umbraPoint, const SkPoint& centroid, SkPoint* clipPoint);
76 const SkTDArray<SkPoint>& umbraPolygon, bool lastEdge, bool doClip);
77 bool addInnerPoint(const SkPoint& pathPoint, SkColor umbraColor,
78 const SkTDArray<SkPoint>& umbraPolygon, int* currUmbraIndex);
79 int getClosestUmbraIndex(const SkPoint& point, const SkTDArray<SkPoint>& umbraPolygon);
83 void stitchConcaveRings(const SkTDArray<SkPoint>& umbraPolygon,
85 const SkTDArray<SkPoint>& penumbraPolygon,
88 void handleLine(const SkPoint& p);
[all …]
/external/skia/tools/viewer/
DPathOverstrokeSlide.cpp62 SkPath quadPath(SkPoint p1, SkPoint p2) { in quadPath()
69 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 2.0f, p1.y() * 0.7f); in quadPath()
76 SkPath cubicPath(SkPoint p1, SkPoint p2) { in cubicPath()
82 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 3.0f, p1.y() * 0.7f); in cubicPath()
83 SkPoint p4 = SkPoint::Make(2.0f*(p1.x() + p2.x()) / 3.0f, p1.y() * 1.5f); in cubicPath()
90 SkPath linSemicirclePath(SkPoint p1, SkPoint p2) { in linSemicirclePath()
97 SkPoint pt; in linSemicirclePath()
103 pt = SkPoint::Make(x, y); in linSemicirclePath()
111 SkPath rectPath(SkPoint p1) { in rectPath()
126 SkPoint p1 = SkPoint::Make(50, 50); in draw()
[all …]
DDegenerateQuadsSlide.cpp25 const SkPoint& p0, const SkPoint& p1) { in draw_extended_line()
37 SkPoint m = (p0 + p1) * 0.5f; in draw_extended_line()
41 static void make_aa_line(const SkPoint& p0, const SkPoint& p1, bool aaOn, in make_aa_line()
42 bool outset, SkPoint line[2]) { in make_aa_line()
55 static SkScalar signed_distance(const SkPoint& p, const SkPoint& l0, const SkPoint& l1) { in signed_distance()
63 static SkScalar get_area_coverage(const bool edgeAA[4], const SkPoint corners[4], in get_area_coverage()
64 const SkPoint& point) { in get_area_coverage()
78 SkPoint p0 = intersection.getPoint(i); in get_area_coverage()
79 SkPoint p1 = intersection.getPoint((i + 1) % intersection.countPoints()); in get_area_coverage()
93 SkPoint e0 = corners[i]; in get_area_coverage()
[all …]

12345678910>>...38