/third_party/skia/gm/ |
H A D | degeneratesegments.cpp | 14 #include "include/core/SkPoint.h" 37 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 moveToP in AddMoveClose() [all...] |
/third_party/skia/src/core/ |
H A D | SkPointPriv.h | 11 #include "include/core/SkPoint.h" 22 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, in DistanceToLineBetween() 36 const SkPoint& b, Side* side = nullptr) { in DistanceToLineBetween() 40 static SkScalar DistanceToLineSegmentBetweenSqd(const SkPoint [all...] |
H A 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() 44 SkPoint SkEvalQuadAt(const SkPoint src[3], SkScalar t); 45 SkPoint SkEvalQuadTangentAt(const SkPoint src[3], SkScalar t); 50 void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, SkVector* tangent = nullptr); 56 void SkChopQuadAt(const SkPoint sr [all...] |
H A 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[]); 37 SkPoint* fCurrPoint; 45 SkPoint fPoints[kMaxPoints]; 48 void clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip); 49 void clipMonoCubic(const SkPoint srcPts[4], const SkRect& clip); 50 void appendLine(SkPoint p [all...] |
H A D | SkStroke.cpp | 93 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 [all...] |
H A D | SkPathMakers.h | 12 #include "include/core/SkPoint.h" 21 const SkPoint& current() const { in current() 26 const SkPoint& 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 in SkPath_OvalPointIterator() [all...] |
H A D | SkPathBuilder.cpp | 88 SkPathBuilder& SkPathBuilder::moveTo(SkPoint pt) { in moveTo() 100 SkPathBuilder& SkPathBuilder::lineTo(SkPoint pt) { in lineTo() 110 SkPathBuilder& SkPathBuilder::quadTo(SkPoint pt1, SkPoint pt2) { in quadTo() 113 SkPoint* p = fPts.append(2); in quadTo() 122 SkPathBuilder& SkPathBuilder::conicTo(SkPoint pt1, SkPoint pt2, SkScalar w) { in conicTo() 125 SkPoint* p = fPts.append(2); in conicTo() 135 SkPathBuilder& SkPathBuilder::cubicTo(SkPoint pt1, SkPoint pt [all...] |
H A 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 pt [all...] |
H A D | SkPoint.cpp | 12 void SkPoint::dump(std::string& desc, int depth) const { in dump() 14 desc += split + "\n SkPoint:{ \n"; in dump() 20 void SkPoint::scale(SkScalar scale, SkPoint* dst) const { in scale() 25 bool SkPoint::normalize() { in normalize() 29 bool SkPoint::setNormalize(SkScalar x, SkScalar y) { in setNormalize() 33 bool SkPoint::setLength(SkScalar length) { in setLength() 45 template <bool use_rsqrt> bool set_point_length(SkPoint* pt, float x, float y, float length, in set_point_length() 74 SkScalar SkPoint::Normalize(SkPoint* p [all...] |
H A D | SkEdgeClipper.cpp | 35 static bool sort_increasing_Y(SkPoint dst[], const SkPoint src[], int count) { in sort_increasing_Y() 43 memcpy(dst, src, count * sizeof(SkPoint)); in sort_increasing_Y() 48 bool SkEdgeClipper::clipLine(SkPoint p0, SkPoint p1, const SkRect& clip) { in clipLine() 52 SkPoint lines[SkLineClipper::kMaxPoints]; in clipLine() 53 const SkPoint pts[] = { p0, p1 }; in clipLine() 86 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY() 90 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX() 95 static void chop_quad_in_Y(SkPoint pt [all...] |
/third_party/skia/tests/ |
H A D | InsetConvexPolyTest.cpp | 11 SkTDArray<SkPoint> rrectPoly; in DEF_TEST() 14 *rrectPoly.push() = SkPoint::Make(-100, 55); in DEF_TEST() 15 *rrectPoly.push() = SkPoint::Make(100, 55); in DEF_TEST() 16 *rrectPoly.push() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST() 17 *rrectPoly.push() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST() 18 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST() 19 *rrectPoly.push() = SkPoint::Make(105, 50); in DEF_TEST() 20 *rrectPoly.push() = SkPoint::Make(105, -50); in DEF_TEST() 21 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, -50 - 2.5f); in DEF_TEST() 22 *rrectPoly.push() = SkPoint in DEF_TEST() [all...] |
H A D | OffsetSimplePolyTest.cpp | 11 SkTDArray<SkPoint> rrectPoly; in DEF_TEST() 17 *rrectPoly.push() = SkPoint::Make(-100, 55); in DEF_TEST() 18 *rrectPoly.push() = SkPoint::Make(100, 55); in DEF_TEST() 19 *rrectPoly.push() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST() 20 *rrectPoly.push() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST() 21 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST() 22 *rrectPoly.push() = SkPoint::Make(105, 50); in DEF_TEST() 23 *rrectPoly.push() = SkPoint::Make(105, -50); in DEF_TEST() 24 *rrectPoly.push() = SkPoint::Make(100 + 4.330127f, -50 - 2.5f); in DEF_TEST() 25 *rrectPoly.push() = SkPoint in DEF_TEST() [all...] |
H A D | PolyUtilsTest.cpp | 12 SkTDArray<SkPoint> poly; in DEF_TEST() 21 *poly.push() = SkPoint::Make(-100, 55); in DEF_TEST() 22 *poly.push() = SkPoint::Make(100, 55); in DEF_TEST() 23 *poly.push() = SkPoint::Make(102.5f, 54.330127f); in DEF_TEST() 86 *poly.push() = SkPoint::Make(-100, 55); in DEF_TEST() 87 *poly.push() = SkPoint::Make(100, 55); in DEF_TEST() 88 *poly.push() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f); in DEF_TEST() 89 *poly.push() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f); in DEF_TEST() 90 *poly.push() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f); in DEF_TEST() 91 *poly.push() = SkPoint in DEF_TEST() [all...] |
H A D | WangsFormulaTest.cpp | 17 const SkPoint kSerp[4] = { 20 const SkPoint kLoop[4] = { 23 const SkPoint kQuad[4] = { 26 static float wangs_formula_quadratic_reference_impl(float precision, const SkPoint p[3]) { in wangs_formula_quadratic_reference_impl() 31 static float wangs_formula_cubic_reference_impl(float precision, const SkPoint p[4]) { in wangs_formula_cubic_reference_impl() 46 const SkPoint P[3], in wangs_formula_conic_reference_impl() 57 const SkPoint C = SkPoint::Make(0.5f * (min_x + max_x), 0.5f * (min_y + max_y)); in wangs_formula_conic_reference_impl() 60 SkPoint tP[3] = {P[0] - C, P[1] - C, P[2] - C}; in wangs_formula_conic_reference_impl() 105 std::function<void(const SkPoint[])> in for_random_beziers() [all...] |
H A D | GeometryTest.cpp | 16 static bool nearly_equal(const SkPoint& a, const SkPoint& b) { in nearly_equal() 26 const SkPoint src[] = { in testChopCubic() 32 SkPoint dst[13]; in testChopCubic() 41 SkPoint pts[7]; in testChopCubic() 65 SkPoint pts[4] = {{rand.nextF(), rand.nextF()}, {rand.nextF(), rand.nextF()}, in testChopCubic() 68 SkPoint allChops[4 + SK_ARRAY_COUNT(chopTs)*3]; in testChopCubic() 73 SkPoint expectedPt; in testChopCubic() 86 SkPoint localChops[10]; in testChopCubic() 108 SkPoint oneChop in testChopCubic() [all...] |
/third_party/skia/src/gpu/geometry/ |
H A D | GrPathUtils.h | 44 uint32_t quadraticPointCount(const SkPoint points[], SkScalar tol); 47 uint32_t generateQuadraticPoints(const SkPoint& p0, 48 const SkPoint& p1, 49 const SkPoint& p2, 51 SkPoint** points, 57 uint32_t cubicPointCount(const SkPoint points[], SkScalar tol); 60 uint32_t generateCubicPoints(const SkPoint& p0, 61 const SkPoint& p1, 62 const SkPoint& p2, 63 const SkPoint [all...] |
/third_party/skia/src/pathops/ |
H A D | SkPathOpsCurve.h | 19 SkPoint fPts[4]; 23 const SkPoint& operator[](int n) const { in operator []() 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 curv [all...] |
H A D | SkOpContour.cpp | 44 void SkOpContourBuilder::addConic(SkPoint pts[3], SkScalar weight) { in addConic() 49 void SkOpContourBuilder::addCubic(SkPoint pts[4]) { in addCubic() 54 void SkOpContourBuilder::addCurve(SkPath::Verb verb, const SkPoint pts[4], SkScalar weight) { in addCurve() 62 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve() 63 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve() 67 SkPoint* ptStorage = allocator->makeArrayDefault<SkPoint>(3); in addCurve() 68 memcpy(ptStorage, pts, sizeof(SkPoint) * 3); in addCurve() 72 SkPoint* ptStorag in addCurve() [all...] |
/third_party/skia/include/core/ |
H A D | SkPathBuilder.h | 38 SkPathBuilder& moveTo(SkPoint pt); 39 SkPathBuilder& moveTo(SkScalar x, SkScalar y) { return this->moveTo(SkPoint::Make(x, y)); } in moveTo() 41 SkPathBuilder& lineTo(SkPoint pt); 42 SkPathBuilder& lineTo(SkScalar x, SkScalar y) { return this->lineTo(SkPoint::Make(x, y)); } in lineTo() 44 SkPathBuilder& quadTo(SkPoint pt1, SkPoint pt2); 46 return this->quadTo(SkPoint::Make(x1, y1), SkPoint::Make(x2, y2)); in quadTo() 48 SkPathBuilder& quadTo(const SkPoint pts[2]) { return this->quadTo(pts[0], pts[1]); } in quadTo() 50 SkPathBuilder& conicTo(SkPoint pt [all...] |
H A D | SkPath.h | 65 static SkPath Make(const SkPoint[], int pointCount, 81 static SkPath Polygon(const SkPoint pts[], int count, bool isClosed, 85 static SkPath Polygon(const std::initializer_list<SkPoint>& list, bool isClosed, in Polygon() 91 static SkPath Line(const SkPoint a, const SkPoint b) { in Line() 95 /** Constructs an empty SkPath. By default, SkPath has no verbs, no SkPoint, and no weights. 106 the returned result share pointer values. The underlying verb array, SkPoint array 128 shares pointer values. The underlying verb array, SkPoint array and weights 135 @param path verb array, SkPoint array, weights, and SkPath::FillType to copy 142 /** Compares a and b; returns true if SkPath::FillType, verb array, SkPoint arra [all...] |
/third_party/skia/samplecode/ |
H A D | SamplePathOverstroke.cpp | 63 SkPath quadPath(SkPoint p1, SkPoint p2) { in quadPath() 70 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 2.0f, p1.y() * 0.7f); in quadPath() 77 SkPath cubicPath(SkPoint p1, SkPoint p2) { in cubicPath() 83 SkPoint p3 = SkPoint::Make((p1.x() + p2.x()) / 3.0f, p1.y() * 0.7f); in cubicPath() 84 SkPoint p4 = SkPoint in cubicPath() [all...] |
H A D | SampleDegenerateQuads.cpp | 26 const SkPoint& p0, const SkPoint& p1) { in draw_extended_line() 38 SkPoint m = (p0 + p1) * 0.5f; in draw_extended_line() 42 static void make_aa_line(const SkPoint& p0, const SkPoint& p1, bool aaOn, in make_aa_line() 43 bool outset, SkPoint line[2]) { in make_aa_line() 56 static SkScalar signed_distance(const SkPoint& p, const SkPoint& l0, const SkPoint& l1) { in signed_distance() 64 static SkScalar get_area_coverage(const bool edgeAA[4], const SkPoint corner [all...] |
/third_party/skia/src/utils/ |
H A D | SkPatchUtils.h | 30 static void GetTopCubic(const SkPoint cubics[12], SkPoint points[4]); 35 static void GetBottomCubic(const SkPoint cubics[12], SkPoint points[4]); 40 static void GetLeftCubic(const SkPoint cubics[12], SkPoint points[4]); 45 static void GetRightCubic(const SkPoint cubics[12], SkPoint points[4]); 50 static SkISize GetLevelOfDetail(const SkPoint cubics[12], const SkMatrix* matrix); 52 static sk_sp<SkVertices> MakeVertices(const SkPoint cubic [all...] |
H A D | SkShadowTessellator.cpp | 50 bool accumulateCentroid(const SkPoint& c, const SkPoint& n); 51 bool checkConvexity(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2); 57 bool clipUmbraPoint(const SkPoint& umbraPoint, const SkPoint& centroid, SkPoint* clipPoint); 59 const SkTDArray<SkPoint>& umbraPolygon, bool lastEdge, bool doClip); 60 bool addInnerPoint(const SkPoint [all...] |
/third_party/skia/docs/examples/ |
H A D | SkPath_quadTo_example_parametric_animated.cpp | 7 SkPoint quad(SkPoint p0, SkPoint p1, SkPoint p2, float t) { in REG_FIDDLE_ANIMATED() 24 static SkPoint interpolate(SkPoint a, SkPoint b, float t) { in REG_FIDDLE_ANIMATED() 29 static void draw_line(SkCanvas* canvas, SkPoint p0, SkPoint p1, const SkPaint& paint) { in REG_FIDDLE_ANIMATED() 33 static void draw_point(SkCanvas* canvas, SkPoint in REG_FIDDLE_ANIMATED() [all...] |