/external/skia/gm/ |
D | degeneratesegments.cpp | 33 typedef SkPoint (*AddSegmentFunc)(SkPath&, SkPoint&); 38 static SkPoint AddMove(SkPath& path, SkPoint& startPt) { in AddMove() 39 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMove() 44 static SkPoint AddMoveClose(SkPath& path, SkPoint& startPt) { in AddMoveClose() 45 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveClose() 51 static SkPoint AddDegenLine(SkPath& path, SkPoint& startPt) { in AddDegenLine() 56 static SkPoint AddMoveDegenLine(SkPath& path, SkPoint& startPt) { in AddMoveDegenLine() 57 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLine() 63 static SkPoint AddMoveDegenLineClose(SkPath& path, SkPoint& startPt) { in AddMoveDegenLineClose() 64 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLineClose() [all …]
|
/external/skqp/gm/ |
D | degeneratesegments.cpp | 33 typedef SkPoint (*AddSegmentFunc)(SkPath&, SkPoint&); 38 static SkPoint AddMove(SkPath& path, SkPoint& startPt) { in AddMove() 39 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMove() 44 static SkPoint AddMoveClose(SkPath& path, SkPoint& startPt) { in AddMoveClose() 45 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveClose() 51 static SkPoint AddDegenLine(SkPath& path, SkPoint& startPt) { in AddDegenLine() 56 static SkPoint AddMoveDegenLine(SkPath& path, SkPoint& startPt) { in AddMoveDegenLine() 57 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLine() 63 static SkPoint AddMoveDegenLineClose(SkPath& path, SkPoint& startPt) { in AddMoveDegenLineClose() 64 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLineClose() [all …]
|
/external/skqp/tests/ |
D | InsetConvexPolyTest.cpp | 10 static bool is_convex(const SkTDArray<SkPoint>& poly) { in is_convex() 35 SkTDArray<SkPoint> rrectPoly; in DEF_TEST() 38 *rrectPoly.push() = SkPoint::Make(-100, 55); in DEF_TEST() 39 *rrectPoly.push() = SkPoint::Make(100, 55); in DEF_TEST() 40 *rrectPoly.push() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST() 41 *rrectPoly.push() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST() 42 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST() 43 *rrectPoly.push() = SkPoint::Make(105, 50); in DEF_TEST() 44 *rrectPoly.push() = SkPoint::Make(105, -50); in DEF_TEST() 45 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, -50 - 2.5f); in DEF_TEST() [all …]
|
/external/skia/tests/ |
D | InsetConvexPolyTest.cpp | 10 static bool is_convex(const SkTDArray<SkPoint>& poly) { in is_convex() 35 SkTDArray<SkPoint> rrectPoly; in DEF_TEST() 38 *rrectPoly.push() = SkPoint::Make(-100, 55); in DEF_TEST() 39 *rrectPoly.push() = SkPoint::Make(100, 55); in DEF_TEST() 40 *rrectPoly.push() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST() 41 *rrectPoly.push() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST() 42 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST() 43 *rrectPoly.push() = SkPoint::Make(105, 50); in DEF_TEST() 44 *rrectPoly.push() = SkPoint::Make(105, -50); in DEF_TEST() 45 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, -50 - 2.5f); in DEF_TEST() [all …]
|
/external/skqp/src/core/ |
D | SkGeometry.h | 14 static inline Sk2s from_point(const SkPoint& point) { in from_point() 18 static inline SkPoint to_point(const Sk2s& x) { in to_point() 19 SkPoint point; in to_point() 35 SkPoint SkEvalQuadAt(const SkPoint src[3], SkScalar t); 36 SkPoint SkEvalQuadTangentAt(const SkPoint src[3], SkScalar t); 41 void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, SkVector* tangent = nullptr); 47 void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t); 52 void SkChopQuadAtHalf(const SkPoint src[3], SkPoint dst[5]); 70 int SkChopQuadAtYExtrema(const SkPoint src[3], SkPoint dst[5]); 71 int SkChopQuadAtXExtrema(const SkPoint src[3], SkPoint dst[5]); [all …]
|
D | SkPointPriv.h | 21 static bool AreFinite(const SkPoint array[], int count) { in AreFinite() 25 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 …]
|
D | SkStroke.cpp | 55 static bool set_normal_unitnormal(const SkPoint& before, const SkPoint& after, SkScalar scale, in set_normal_unitnormal() 81 SkPoint fQuad[3]; // the stroked quad parallel to the original curve 82 SkPoint fTangentStart; // a point tangent to fQuad[0] 83 SkPoint fTangentEnd; // a point tangent to fQuad[2] 129 SkPoint moveToPt() const { return fFirstPt; } in moveToPt() 131 void moveTo(const SkPoint&); 132 void lineTo(const SkPoint&, const SkPath::Iter* iter = nullptr); 133 void quadTo(const SkPoint&, const SkPoint&); 134 void conicTo(const SkPoint&, const SkPoint&, SkScalar weight); 135 void cubicTo(const SkPoint&, const SkPoint&, const SkPoint&); [all …]
|
D | SkEdgeClipper.h | 21 bool clipLine(SkPoint p0, SkPoint p1, const SkRect& clip); 22 bool clipQuad(const SkPoint pts[3], const SkRect& clip); 23 bool clipCubic(const SkPoint pts[4], const SkRect& clip); 25 SkPath::Verb next(SkPoint pts[]); 30 SkPoint* fCurrPoint; 38 SkPoint fPoints[kMaxPoints]; 41 void clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip); 42 void clipMonoCubic(const SkPoint srcPts[4], const SkRect& clip); 43 void appendLine(SkPoint p0, SkPoint p1); 45 void appendQuad(const SkPoint pts[3], bool reverse); [all …]
|
D | SkEdgeClipper.cpp | 33 static bool sort_increasing_Y(SkPoint dst[], const SkPoint src[], int count) { in sort_increasing_Y() 41 memcpy(dst, src, count * sizeof(SkPoint)); in sort_increasing_Y() 46 bool SkEdgeClipper::clipLine(SkPoint p0, SkPoint p1, const SkRect& clip) { in clipLine() 50 SkPoint lines[SkLineClipper::kMaxPoints]; in clipLine() 51 const SkPoint pts[] = { p0, p1 }; in clipLine() 84 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY() 88 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX() 93 static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { in chop_quad_in_Y() 95 SkPoint tmp[5]; // for SkChopQuadAt in chop_quad_in_Y() 142 void SkEdgeClipper::clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip) { in clipMonoQuad() [all …]
|
D | SkQuadClipper.h | 26 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 …]
|
/external/skia/src/core/ |
D | SkGeometry.h | 14 static inline Sk2s from_point(const SkPoint& point) { in from_point() 18 static inline SkPoint to_point(const Sk2s& x) { in to_point() 19 SkPoint point; in to_point() 35 SkPoint SkEvalQuadAt(const SkPoint src[3], SkScalar t); 36 SkPoint SkEvalQuadTangentAt(const SkPoint src[3], SkScalar t); 41 void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, SkVector* tangent = nullptr); 47 void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t); 52 void SkChopQuadAtHalf(const SkPoint src[3], SkPoint dst[5]); 70 int SkChopQuadAtYExtrema(const SkPoint src[3], SkPoint dst[5]); 71 int SkChopQuadAtXExtrema(const SkPoint src[3], SkPoint dst[5]); [all …]
|
D | SkPointPriv.h | 21 static bool AreFinite(const SkPoint array[], int count) { in AreFinite() 25 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 …]
|
D | SkStroke.cpp | 55 static bool set_normal_unitnormal(const SkPoint& before, const SkPoint& after, SkScalar scale, in set_normal_unitnormal() 81 SkPoint fQuad[3]; // the stroked quad parallel to the original curve 82 SkPoint fTangentStart; // a point tangent to fQuad[0] 83 SkPoint fTangentEnd; // a point tangent to fQuad[2] 129 SkPoint moveToPt() const { return fFirstPt; } in moveToPt() 131 void moveTo(const SkPoint&); 132 void lineTo(const SkPoint&, const SkPath::Iter* iter = nullptr); 133 void quadTo(const SkPoint&, const SkPoint&); 134 void conicTo(const SkPoint&, const SkPoint&, SkScalar weight); 135 void cubicTo(const SkPoint&, const SkPoint&, const SkPoint&); [all …]
|
D | SkEdgeClipper.h | 21 bool clipLine(SkPoint p0, SkPoint p1, const SkRect& clip); 22 bool clipQuad(const SkPoint pts[3], const SkRect& clip); 23 bool clipCubic(const SkPoint pts[4], const SkRect& clip); 25 SkPath::Verb next(SkPoint pts[]); 30 SkPoint* fCurrPoint; 38 SkPoint fPoints[kMaxPoints]; 41 void clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip); 42 void clipMonoCubic(const SkPoint srcPts[4], const SkRect& clip); 43 void appendLine(SkPoint p0, SkPoint p1); 45 void appendQuad(const SkPoint pts[3], bool reverse); [all …]
|
D | SkEdgeClipper.cpp | 33 static bool sort_increasing_Y(SkPoint dst[], const SkPoint src[], int count) { in sort_increasing_Y() 41 memcpy(dst, src, count * sizeof(SkPoint)); in sort_increasing_Y() 46 bool SkEdgeClipper::clipLine(SkPoint p0, SkPoint p1, const SkRect& clip) { in clipLine() 50 SkPoint lines[SkLineClipper::kMaxPoints]; in clipLine() 51 const SkPoint pts[] = { p0, p1 }; in clipLine() 84 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY() 88 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX() 93 static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { in chop_quad_in_Y() 95 SkPoint tmp[5]; // for SkChopQuadAt in chop_quad_in_Y() 142 void SkEdgeClipper::clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip) { in clipMonoQuad() [all …]
|
D | SkQuadClipper.h | 26 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 …]
|
/external/skqp/src/gpu/ |
D | GrPathUtils.h | 32 uint32_t quadraticPointCount(const SkPoint points[], SkScalar tol); 34 uint32_t generateQuadraticPoints(const SkPoint& p0, 35 const SkPoint& p1, 36 const SkPoint& p2, 38 SkPoint** points, 41 uint32_t cubicPointCount(const SkPoint points[], SkScalar tol); 43 uint32_t generateCubicPoints(const SkPoint& p0, 44 const SkPoint& p1, 45 const SkPoint& p2, 46 const SkPoint& p3, [all …]
|
/external/skia/src/gpu/ |
D | GrPathUtils.h | 32 uint32_t quadraticPointCount(const SkPoint points[], SkScalar tol); 34 uint32_t generateQuadraticPoints(const SkPoint& p0, 35 const SkPoint& p1, 36 const SkPoint& p2, 38 SkPoint** points, 41 uint32_t cubicPointCount(const SkPoint points[], SkScalar tol); 43 uint32_t generateCubicPoints(const SkPoint& p0, 44 const SkPoint& p1, 45 const SkPoint& p2, 46 const SkPoint& p3, [all …]
|
/external/skqp/src/pathops/ |
D | SkPathOpsCurve.h | 19 SkPoint fPts[4]; 23 const SkPoint& operator[](int n) const { 67 SkDPoint conicTop(const SkPoint curve[3], SkScalar curveWeight, 69 SkDPoint cubicTop(const SkPoint curve[4], SkScalar , double s, double e, double* topT); 72 SkDPoint lineTop(const SkPoint[2], SkScalar , double , double , double* topT); 75 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, double* topT); 77 void setConicBounds(const SkPoint curve[3], SkScalar curveWeight, 79 void setCubicBounds(const SkPoint curve[4], SkScalar , 81 void setQuadBounds(const SkPoint curve[3], SkScalar , 99 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeight, [all …]
|
D | SkOpContour.cpp | 45 void SkOpContourBuilder::addConic(SkPoint pts[3], SkScalar weight) { in addConic() 50 void SkOpContourBuilder::addCubic(SkPoint pts[4]) { in addCubic() 55 void SkOpContourBuilder::addCurve(SkPath::Verb verb, const SkPoint pts[4], SkScalar weight) { in addCurve() 63 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve() 64 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve() 68 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve() 69 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve() 73 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(4); in addCurve() 74 memcpy(ptStorage, pts, sizeof(SkPoint) * 4); in addCurve() 82 void SkOpContourBuilder::addLine(const SkPoint pts[2]) { in addLine() [all …]
|
/external/skia/src/pathops/ |
D | SkPathOpsCurve.h | 19 SkPoint fPts[4]; 23 const SkPoint& operator[](int n) const { 67 SkDPoint conicTop(const SkPoint curve[3], SkScalar curveWeight, 69 SkDPoint cubicTop(const SkPoint curve[4], SkScalar , double s, double e, double* topT); 72 SkDPoint lineTop(const SkPoint[2], SkScalar , double , double , double* topT); 75 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, double* topT); 77 void setConicBounds(const SkPoint curve[3], SkScalar curveWeight, 79 void setCubicBounds(const SkPoint curve[4], SkScalar , 81 void setQuadBounds(const SkPoint curve[3], SkScalar , 99 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeight, [all …]
|
D | SkOpContour.cpp | 45 void SkOpContourBuilder::addConic(SkPoint pts[3], SkScalar weight) { in addConic() 50 void SkOpContourBuilder::addCubic(SkPoint pts[4]) { in addCubic() 55 void SkOpContourBuilder::addCurve(SkPath::Verb verb, const SkPoint pts[4], SkScalar weight) { in addCurve() 63 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve() 64 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve() 68 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve() 69 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve() 73 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(4); in addCurve() 74 memcpy(ptStorage, pts, sizeof(SkPoint) * 4); in addCurve() 82 void SkOpContourBuilder::addLine(const SkPoint pts[2]) { in addLine() [all …]
|
/external/skia/include/core/ |
D | SkPath.h | 381 static bool IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact); 394 static bool IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2, 395 const SkPoint& p3, bool exact); 409 static bool IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2, 410 const SkPoint& p3, const SkPoint& p4, bool exact); 421 bool isLine(SkPoint line[2]) const; 437 SkPoint getPoint(int index) const; 447 int getPoints(SkPoint points[], int max) const; 552 void moveTo(const SkPoint& p) { in moveTo() 585 void lineTo(const SkPoint& p) { in lineTo() [all …]
|
/external/skqp/samplecode/ |
D | SamplePathOverstroke.cpp | 69 SkPath quadPath(SkPoint p1, SkPoint p2) { in quadPath() 76 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 2.0f, p1.y() * 0.7f); in quadPath() 83 SkPath cubicPath(SkPoint p1, SkPoint p2) { in cubicPath() 89 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 3.0f, p1.y() * 0.7f); in cubicPath() 90 SkPoint p4 = SkPoint::Make(2.0f*(p1.x() + p2.x()) / 3.0f, p1.y() * 1.5f); in cubicPath() 97 SkPath linSemicirclePath(SkPoint p1, SkPoint p2) { in linSemicirclePath() 104 SkPoint pt; in linSemicirclePath() 110 pt = SkPoint::Make(x, y); in linSemicirclePath() 118 SkPath rectPath(SkPoint p1) { in rectPath() 132 SkPoint p1 = SkPoint::Make(50, 50); in onDrawContent() [all …]
|
/external/skia/samplecode/ |
D | SamplePathOverstroke.cpp | 69 SkPath quadPath(SkPoint p1, SkPoint p2) { in quadPath() 76 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 2.0f, p1.y() * 0.7f); in quadPath() 83 SkPath cubicPath(SkPoint p1, SkPoint p2) { in cubicPath() 89 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 3.0f, p1.y() * 0.7f); in cubicPath() 90 SkPoint p4 = SkPoint::Make(2.0f*(p1.x() + p2.x()) / 3.0f, p1.y() * 1.5f); in cubicPath() 97 SkPath linSemicirclePath(SkPoint p1, SkPoint p2) { in linSemicirclePath() 104 SkPoint pt; in linSemicirclePath() 110 pt = SkPoint::Make(x, y); in linSemicirclePath() 118 SkPath rectPath(SkPoint p1) { in rectPath() 132 SkPoint p1 = SkPoint::Make(50, 50); in onDrawContent() [all …]
|