/third_party/skia/samplecode/ |
H A D | SampleHairCurves.cpp | 33 SkScalar pts[] = { variable 39 curves.moveTo(pts[0], pts[1]); 40 curves.cubicTo(pts[2], pts[3], 41 pts[4], pts[5], 42 pts[6], pts[7]); 44 hulls.moveTo(pts[ 55 SkScalar pts[] = { global() variable 73 SkScalar pts[] = { global() variable 94 SkScalar pts[] = { global() variable [all...] |
H A D | SampleGradients.cpp | 13 SkPoint pts[] = { { r.fLeft, r.fTop }, { r.fRight, r.fTop } }; in setgrad() local 14 return SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkTileMode::kClamp); in setgrad() 63 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, SkTileMode tm) { in MakeLinear() argument 64 return SkGradientShader::MakeLinear(pts, data.fColors, data.fPos, data.fCount, tm); in MakeLinear() 67 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, SkTileMode tm) { in MakeRadial() argument 69 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 70 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 75 static sk_sp<SkShader> MakeSweep(const SkPoint pts[ argument 82 Make2Conical(const SkPoint pts[2], const GradData& data, SkTileMode tm) Make2Conical() argument 94 Make2ConicalConcentric(const SkPoint pts[2], const GradData& data, SkTileMode tm) Make2ConicalConcentric() argument 123 SkPoint pts[2] = { global() variable [all...] |
H A D | SampleFatBits.cpp | 39 static void apply_grid(SkPoint pts[], int count) { in apply_grid() argument 41 pts[i].set(apply_grid(pts[i].fX), apply_grid(pts[i].fY)); in apply_grid() 119 void drawLine(SkCanvas*, SkPoint pts[2]); 120 void drawRect(SkCanvas* canvas, SkPoint pts[2]); 121 void drawTriangle(SkCanvas* canvas, SkPoint pts[3]); 158 void drawTriangleSkeleton(SkCanvas* max, const SkPoint pts[]); 159 void drawLineSkeleton(SkCanvas* max, const SkPoint pts[]); 234 void FatBits::drawLineSkeleton(SkCanvas* max, const SkPoint pts[]) { in drawLineSkeleton() argument 257 drawLine(SkCanvas* canvas, SkPoint pts[]) drawLine() argument 289 drawRect(SkCanvas* canvas, SkPoint pts[2]) drawRect() argument 319 drawTriangleSkeleton(SkCanvas* max, const SkPoint pts[]) drawTriangleSkeleton() argument 332 drawTriangle(SkCanvas* canvas, SkPoint pts[3]) drawTriangle() argument [all...] |
/third_party/skia/src/pathops/ |
H A D | SkAddIntersections.cpp | 15 static void debugShowLineIntersection(int pts, const SkIntersectionHelper& wt, in debugShowLineIntersection() argument 17 SkASSERT(i.used() == pts); in debugShowLineIntersection() 18 if (!pts) { in debugShowLineIntersection() 20 __FUNCTION__, LINE_DEBUG_DATA(wt.pts()), LINE_DEBUG_DATA(wn.pts())); in debugShowLineIntersection() 24 i[0][0], LINE_DEBUG_DATA(wt.pts()), PT_DEBUG_DATA(i, 0)); in debugShowLineIntersection() 25 if (pts == 2) { in debugShowLineIntersection() 28 SkDebugf(" wnTs[0]=%g " LINE_DEBUG_STR, i[1][0], LINE_DEBUG_DATA(wn.pts())); in debugShowLineIntersection() 29 if (pts == 2) { in debugShowLineIntersection() 35 static void debugShowQuadLineIntersection(int pts, cons argument 56 debugShowQuadIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowQuadIntersection() argument 76 debugShowConicLineIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowConicLineIntersection() argument 96 debugShowConicQuadIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowConicQuadIntersection() argument 116 debugShowConicIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowConicIntersection() argument 137 debugShowCubicLineIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowCubicLineIntersection() argument 157 debugShowCubicQuadIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowCubicQuadIntersection() argument 177 debugShowCubicConicIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowCubicConicIntersection() argument 197 debugShowCubicIntersection(int pts, const SkIntersectionHelper& wt, const SkIntersectionHelper& wn, const SkIntersections& i) debugShowCubicIntersection() argument 283 int pts = 0; AddIntersectTs() local [all...] |
H A D | SkLineParameters.h | 31 bool cubicEndPoints(const SkDCubic& pts) { in cubicEndPoints() argument 33 cubicEndPoints(pts, 0, endIndex); in cubicEndPoints() 38 cubicEndPoints(pts, 0, ++endIndex); in cubicEndPoints() 44 cubicEndPoints(pts, 0, ++endIndex); // line in cubicEndPoints() 55 if (NotAlmostEqualUlps(pts[0].fY, pts[++endIndex].fY)) { in cubicEndPoints() 56 if (pts[0].fY > pts[endIndex].fY) { in cubicEndPoints() 65 if (pts[0].fY > pts[ in cubicEndPoints() 71 cubicEndPoints(const SkDCubic& pts, int s, int e) cubicEndPoints() argument 85 lineEndPoints(const SkDLine& pts) lineEndPoints() argument 91 quadEndPoints(const SkDQuad& pts) quadEndPoints() argument 110 quadEndPoints(const SkDQuad& pts, int s, int e) quadEndPoints() argument 138 cubicDistanceY(const SkDCubic& pts, SkDCubic& distance) const cubicDistanceY() argument 146 quadDistanceY(const SkDQuad& pts, SkDQuad& distance) const quadDistanceY() argument 154 controlPtDistance(const SkDCubic& pts, int index) const controlPtDistance() argument [all...] |
H A D | SkPathOpsTightBounds.cpp | 14 for (auto [verb, pts, w] : SkPathPriv::Iterate(path)) { in TightBounds() 17 moveBounds.fLeft = std::min(moveBounds.fLeft, pts[0].fX); in TightBounds() 18 moveBounds.fTop = std::min(moveBounds.fTop, pts[0].fY); in TightBounds() 19 moveBounds.fRight = std::max(moveBounds.fRight, pts[0].fX); in TightBounds() 20 moveBounds.fBottom = std::max(moveBounds.fBottom, pts[0].fY); in TightBounds() 27 wellBehaved &= between(pts[0].fX, pts[1].fX, pts[2].fX); in TightBounds() 28 wellBehaved &= between(pts[0].fY, pts[ in TightBounds() [all...] |
H A D | SkPathOpsAsWinding.cpp | 47 static int contains_edge(SkPoint pts[4], SkPath::Verb verb, SkScalar weight, const SkPoint& edge) { in contains_edge() argument 49 bounds.setBounds(pts, kPtCount[verb] + 1); in contains_edge() 63 int count = (*CurveIntercept[verb * 2])(pts, weight, edge.fY, tVals); in contains_edge() 67 SkScalar intersectX = (*CurvePointAtT[verb])(pts, weight, tVals[index]).fX; in contains_edge() 76 // if intersect x equals edge x, we need to determine if pts is to the left or right of edge in contains_edge() 77 if (pts[0].fX < edge.fX && pts[kPtCount[verb]].fX < edge.fX) { in contains_edge() 82 // example: edge ends 45 degree diagonal going up. If pts is to the left of edge, keep. in contains_edge() 83 // if pts is to the right of edge, discard. With code as is, can't distiguish the two cases. in contains_edge() 88 directions[index] = to_direction((*CurveSlopeAtT[verb])(pts, weigh in contains_edge() 104 left_edge(SkPoint pts[4], SkPath::Verb verb, SkScalar weight, Contour::Direction* direction) left_edge() argument [all...] |
/third_party/skia/gm/ |
H A D | gradients_2pt_conical.cpp | 53 static sk_sp<SkShader> Make2ConicalOutside(const SkPoint pts[2], const GradData& data, in Make2ConicalOutside() argument 56 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutside() 57 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutside() 58 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutside() 59 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutside() 64 static sk_sp<SkShader> Make2ConicalOutsideStrip(const SkPoint pts[ argument 74 Make2ConicalOutsideFlip(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalOutsideFlip() argument 85 Make2ConicalInside(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalInside() argument 98 Make2ConicalInsideFlip(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalInsideFlip() argument 111 Make2ConicalInsideCenter(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalInsideCenter() argument 122 Make2ConicalInsideCenterReversed(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalInsideCenterReversed() argument 133 Make2ConicalZeroRad(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalZeroRad() argument 146 Make2ConicalZeroRadFlip(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalZeroRadFlip() argument 159 Make2ConicalZeroRadCenter(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalZeroRadCenter() argument 171 Make2ConicalZeroRadOutside(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalZeroRadOutside() argument 184 Make2ConicalZeroRadFlipOutside(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalZeroRadFlipOutside() argument 196 Make2ConicalEdgeX(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalEdgeX() argument 208 Make2ConicalEdgeY(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalEdgeY() argument 220 Make2ConicalZeroRadEdgeX(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalZeroRadEdgeX() argument 233 Make2ConicalZeroRadEdgeY(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalZeroRadEdgeY() argument 245 Make2ConicalTouchX(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalTouchX() argument 257 Make2ConicalTouchY(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalTouchY() argument 269 Make2ConicalInsideSmallRad(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2ConicalInsideSmallRad() argument 353 SkPoint pts[2] = { global() variable [all...] |
H A D | gradients.cpp | 74 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() argument 76 return SkGradientShader::MakeLinear(pts, data.fColors, data.fPos, data.fCount, tm, 0, in MakeLinear() 80 static sk_sp<SkShader> MakeLinear4f(const SkPoint pts[2], const GradData& data, in MakeLinear4f() argument 83 return SkGradientShader::MakeLinear(pts, data.fColors4f, srgb, data.fPos, data.fCount, tm, 0, in MakeLinear4f() 87 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() argument 90 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 91 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 96 static sk_sp<SkShader> MakeRadial4f(const SkPoint pts[ argument 106 MakeSweep(const SkPoint pts[2], const GradData& data, SkTileMode, const SkMatrix& localMatrix) MakeSweep() argument 115 MakeSweep4f(const SkPoint pts[2], const GradData& data, SkTileMode, const SkMatrix& localMatrix) MakeSweep4f() argument 125 Make2Radial(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2Radial() argument 138 Make2Radial4f(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2Radial4f() argument 152 Make2Conical(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2Conical() argument 164 Make2Conical4f(const SkPoint pts[2], const GradData& data, SkTileMode tm, const SkMatrix& localMatrix) Make2Conical4f() argument 196 SkPoint pts[2] = { global() variable 253 SkPoint pts[2] ={ global() variable 305 SkPoint pts[2] = { global() variable 679 SkPoint pts[2] = { {0, 0}, {0, 0} }; global() variable 727 SkPoint pts[2]; global() member 855 const SkPoint pts[] = { {50, 50}, {450, 465}}; draw_many_stops() local 1052 static const SkPoint pts[] = { { size / 3, size / 3 }, { size * 2 / 3, size * 2 / 3} }; DEF_SIMPLE_GM() local [all...] |
/third_party/skia/src/core/ |
H A D | SkEdgeClipper.cpp | 53 const SkPoint pts[] = { p0, p1 }; in clipLine() local 54 int lineCount = SkLineClipper::ClipLine(pts, clip, lines, fCanCullToTheRight); in clipLine() 86 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY() argument 87 return chopMonoQuadAt(pts[0].fY, pts[1].fY, pts[2].fY, y, t); in chopMonoQuadAtY() 90 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX() argument 91 return chopMonoQuadAt(pts[0].fX, pts[1].fX, pts[ in chopMonoQuadAtX() 95 chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) chop_quad_in_Y() argument 145 SkPoint pts[3]; clipMonoQuad() local 283 chop_cubic_in_Y(SkPoint pts[4], const SkRect& clip) chop_cubic_in_Y() argument 338 SkPoint pts[4]; clipMonoCubic() local 400 compute_cubic_bounds(const SkPoint pts[4]) compute_cubic_bounds() argument 474 appendQuad(const SkPoint pts[3], bool reverse) appendQuad() argument 488 appendCubic(const SkPoint pts[4], bool reverse) appendCubic() argument 501 next(SkPoint pts[]) next() argument 548 sk_assert_monotonic_y(const SkPoint pts[], int count) sk_assert_monotonic_y() argument 554 sk_assert_monotonic_x(const SkPoint pts[], int count) sk_assert_monotonic_x() argument [all...] |
H A D | SkScan_Hairline.cpp | 62 SkPoint pts[2]; 66 if (!SkLineClipper::IntersectLine(&array[i], fixedBounds, pts)) { 72 if (clip && !SkLineClipper::IntersectLine(pts, clipBounds, pts)) { 76 SkFDot6 x0 = SkScalarToFDot6(pts[0].fX); 77 SkFDot6 y0 = SkScalarToFDot6(pts[0].fY); 78 SkFDot6 x1 = SkScalarToFDot6(pts[1].fX); 79 SkFDot6 y1 = SkScalarToFDot6(pts[1].fY); 221 static uint32_t compute_int_quad_dist(const SkPoint pts[3]) { 224 SkScalar dx = SkScalarHalf(pts[ [all...] |
H A D | SkPath.cpp | 299 for (auto [verb, pts, weight] : SkPathPriv::Iterate(*this)) { in conservativelyContainsRect() 311 firstPt = prevPt = pts[0]; in conservativelyContainsRect() 316 if (!SkPathPriv::AllPointsEq(pts, pointCount + 1)) { in conservativelyContainsRect() 323 orig.set(pts, *weight); in conservativelyContainsRect() 335 if (!check_edge_against_rect(prevPt, pts[nextPt], rect, direction)) { in conservativelyContainsRect() 339 prevPt = pts[nextPt]; in conservativelyContainsRect() 391 const SkPoint* pts = fPathRef->points(); in isLine() local 392 line[0] = pts[0]; in isLine() 393 line[1] = pts[1]; in isLine() 454 const SkPoint* pts in isRect() local 681 SkPoint* pts = ed.growForVerb(kQuad_Verb); quadTo() local 711 SkPoint* pts = ed.growForVerb(kConic_Verb, w); conicTo() local 735 SkPoint* pts = ed.growForVerb(kCubic_Verb); cubicTo() local 817 addPoly(const SkPoint pts[], int count, bool close) addPoly() argument 1015 const SkPoint* pts = fPathRef->points() + startPtIndex; isZeroLengthSincePoint() local 1457 const SkPoint* pts = path.fPathRef->pointsEnd() - 1; reversePathTo() local 1499 const SkPoint* pts = src->fPathRef->pointsEnd(); reverseAddPath() local 1554 subdivide_cubic_to(SkPath* path, const SkPoint pts[4], int level = 2) subdivide_cubic_to() argument 1593 SkPoint pts[4]; transform() local 1735 autoClose(SkPoint pts[2]) autoClose() argument 1774 SkPoint* SK_RESTRICT pts = ptsParam; next() local 1837 next(SkPoint pts[4]) next() argument 1865 append_params(SkString* str, const char label[], const SkPoint pts[], int count, SkScalarAsStringType strType, SkScalar conicWeight = -12345) append_params() argument 1903 SkPoint pts[4]; dump() local 2372 const SkPoint* pts() const { return fCurrPt; } pts() function in ContourIter 2463 find_max_y(const SkPoint pts[], int count) find_max_y() argument 2477 find_diff_pt(const SkPoint pts[], int index, int n, int inc) find_diff_pt() argument 2495 find_min_max_x_at_y(const SkPoint pts[], int index, int n, int* maxIndexPtr) find_min_max_x_at_y() argument 2556 const SkPoint* pts = iter.pts(); ComputeFirstDirection() local 2635 find_minmax(const SkPoint pts[], SkScalar* minPtr, SkScalar* maxPtr) find_minmax() argument 2655 winding_mono_cubic(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) winding_mono_cubic() argument 2701 winding_cubic(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) winding_cubic() argument 2730 const SkPoint* pts = conic.fPts; winding_mono_conic() local 2791 winding_conic(const SkPoint pts[], SkScalar x, SkScalar y, SkScalar weight, int* onCurveCount) winding_conic() argument 2805 winding_mono_quad(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) winding_mono_quad() argument 2860 winding_quad(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) winding_quad() argument 2875 winding_line(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) winding_line() argument 2915 tangent_cubic(const SkPoint pts[], SkScalar x, SkScalar y, SkTDArray<SkVector>* tangents) tangent_cubic() argument 2943 tangent_conic(const SkPoint pts[], SkScalar x, SkScalar y, SkScalar w, SkTDArray<SkVector>* tangents) tangent_conic() argument 2970 tangent_quad(const SkPoint pts[], SkScalar x, SkScalar y, SkTDArray<SkVector>* tangents) tangent_quad() argument 2996 tangent_line(const SkPoint pts[], SkScalar x, SkScalar y, SkTDArray<SkVector>* tangents) tangent_line() argument 3037 SkPoint pts[4]; contains() local 3079 SkPoint pts[4]; contains() local 3123 ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2, SkScalar w, SkPoint pts[], int pow2) ConvertConicToQuads() argument 3442 Make(const SkPoint pts[], int pointCount, const uint8_t vbs[], int verbCount, const SkScalar ws[], int wCount, SkPathFillType ft, bool isVolatile) Make() argument 3491 Polygon(const SkPoint pts[], int count, bool isClosed, SkPathFillType ft, bool isVolatile) Polygon() argument 3511 const SkPoint* pts = *ptsPtr; IsRectContour() local 3645 const SkPoint* pts = path.fPathRef->points(); IsNestedFillRects() local 3861 const SkPoint* pts = path.fPathRef->points(); IsAxisAligned() local [all...] |
H A D | SkAnalyticEdge.h | 113 bool setQuadratic(const SkPoint pts[3]); 130 bool setCubic(const SkPoint pts[4], bool sortY = true); 157 bool set(const SkPoint pts[2]){ 158 if (IsEmpty(pts[0].fY, pts[1].fY)) { 162 fP0 = pts[0]; 163 fP1 = pts[1]; 171 bool set(const SkPoint pts[3]){ 172 if (IsEmpty(pts[0].fY, pts[ [all...] |
H A D | SkContourMeasure.cpp | 31 void SkContourMeasure_segTo(const SkPoint pts[], unsigned segType, in SkContourMeasure_segTo() argument 53 dst->lineTo(pts[1]); in SkContourMeasure_segTo() 55 dst->lineTo(SkScalarInterp(pts[0].fX, pts[1].fX, stopT), in SkContourMeasure_segTo() 56 SkScalarInterp(pts[0].fY, pts[1].fY, stopT)); in SkContourMeasure_segTo() 62 dst->quadTo(pts[1], pts[2]); in SkContourMeasure_segTo() 64 SkChopQuadAt(pts, tmp0, stopT); in SkContourMeasure_segTo() 68 SkChopQuadAt(pts, tmp in SkContourMeasure_segTo() 137 quad_too_curvy(const SkPoint pts[3], SkScalar tolerance) quad_too_curvy() argument 165 cubic_too_curvy(const SkPoint pts[4], SkScalar tolerance) cubic_too_curvy() argument 208 compute_quad_segs(const SkPoint pts[3], SkScalar distance, int mint, int maxt, unsigned ptIndex) compute_quad_segs() argument [all...] |
/third_party/skia/tests/ |
H A D | WangsFormulaTest.cpp | 108 SkPoint pts[4]; in for_random_beziers() local 111 pts[j].set(std::ldexp(1 + rand->nextF(), i), std::ldexp(1 + rand->nextF(), i)); in for_random_beziers() 113 f(pts); in for_random_beziers() 123 auto setupCubicLengthTerm = [](int seed, SkPoint pts[], float term) { in DEF_TEST() 124 memset(pts, 0, sizeof(SkPoint) * 4); in DEF_TEST() 142 pts[0] = term2d; in DEF_TEST() 143 pts[3] = term2d * .75f; in DEF_TEST() 146 pts[1] = term2d * -.5f; in DEF_TEST() 149 pts[1] = term2d * -.5f; in DEF_TEST() 152 pts[ in DEF_TEST() 198 SkPoint pts[4]; DEF_TEST() local [all...] |
H A D | GeometryTest.cpp | 41 SkPoint pts[7]; in testChopCubic() local 43 pts[i].set(i, i); in testChopCubic() 45 SkChopCubicAt(pts, pts, .5f); in testChopCubic() 47 REPORTER_ASSERT(reporter, pts[i].fX == pts[i].fY); in testChopCubic() 48 REPORTER_ASSERT(reporter, pts[i].fX == i * .5f); in testChopCubic() 65 SkPoint pts[4] = {{rand.nextF(), rand.nextF()}, {rand.nextF(), rand.nextF()}, in testChopCubic() local 69 SkChopCubicAt(pts, allChops, chopTs, SK_ARRAY_COUNT(chopTs)); in testChopCubic() 74 SkEvalCubicAt(pts, chop in testChopCubic() 132 SkPoint pts[3]; test_evalquadat() local 171 SkPoint pts[3]; test_conic() local 191 SkPoint pts[] = { test_quad_tangents() local 211 SkPoint pts[] = { test_conic_tangents() local 230 test_this_conic_to_quad(skiatest::Reporter* r, const SkPoint pts[3], SkScalar w) test_this_conic_to_quad() argument 255 const SkPoint* pts = &triples[i]; test_conic_to_quads() local 267 SkPoint pts[] = { test_cubic_tangents() local 457 test_chop_quad_at_midtangent(skiatest::Reporter* reporter, const SkPoint pts[3]) test_chop_quad_at_midtangent() argument 472 test_chop_cubic_at_midtangent(skiatest::Reporter* reporter, const SkPoint pts[4], SkCubicType cubicType) test_chop_cubic_at_midtangent() argument 617 SkPoint pts[5]; DEF_TEST() local [all...] |
H A D | SubsetPath.cpp | 67 for (auto [verb, pts, w] : SkPathPriv::Iterate(fPath)) { in SubsetContours() 102 for (auto [verb, pts, w] : SkPathPriv::Iterate(fPath)) { in getSubsetPath() 104 result.moveTo(pts[0]); in getSubsetPath() 112 result.lineTo(pts[1]); in getSubsetPath() 117 result.quadTo(pts[1], pts[2]); in getSubsetPath() 122 result.conicTo(pts[1], pts[2], *w); in getSubsetPath() 127 result.cubicTo(pts[1], pts[ in getSubsetPath() [all...] |
/third_party/skia/bench/ |
H A D | GradientBench.cpp | 52 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() argument 54 return SkGradientShader::MakeLinear(pts, data.fColors, data.fPos, data.fCount, tm); in MakeLinear() 57 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() argument 60 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 61 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 67 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep() argument 70 center.set(SkScalarAve(pts[0].fX, pts[ in MakeSweep() 76 MakeConical(const SkPoint pts[2], const GradData& data, SkTileMode tm, float scale) MakeConical() argument 89 MakeConicalZeroRad(const SkPoint pts[2], const GradData& data, SkTileMode tm, float scale) MakeConicalZeroRad() argument 102 MakeConicalOutside(const SkPoint pts[2], const GradData& data, SkTileMode tm, float scale) MakeConicalOutside() argument 116 MakeConicalOutsideZeroRad(const SkPoint pts[2], const GradData& data, SkTileMode tm, float scale) MakeConicalOutsideZeroRad() argument 244 const SkPoint pts[2] = { MakeShader() local 331 const SkPoint pts[] = { global() variable [all...] |
H A D | PathIterBench.cpp | 27 static int rand_pts(SkRandom& rand, SkPoint pts[4]) { in rand_pts() argument 32 pts[i].fX = rand.nextSScalar1(); in rand_pts() 33 pts[i].fY = rand.nextSScalar1(); in rand_pts() 52 SkPoint pts[4]; in PathIterBench() local 53 int n = rand_pts(rand, pts); in PathIterBench() 56 fPath.moveTo(pts[0]); in PathIterBench() 59 fPath.lineTo(pts[1]); in PathIterBench() 62 fPath.quadTo(pts[1], pts[2]); in PathIterBench() 65 fPath.cubicTo(pts[ in PathIterBench() 94 SkPoint pts[4]; global() variable [all...] |
/third_party/skia/docs/examples/ |
H A D | SmoothBezierSplineInterpolation.cpp | 7 SkPath MakeCubicSplineInterpolation(const SkPoint* pts, size_t N) { in REG_FIDDLE() argument 15 path.moveTo(pts[0]); in REG_FIDDLE() 16 path.lineTo(pts[1]); in REG_FIDDLE() 28 s[0].r = {pts[0].x() + 2 * pts[1].x(), pts[0].y() + 2 * pts[1].y()}; in REG_FIDDLE() 33 s[i].r = {4 * pts[i].x() + 2 * pts[i + 1].x(), 4 * pts[ in REG_FIDDLE() 71 SkPoint pts[] = { REG_FIDDLE() local [all...] |
H A D | Path_arcTo_2_a.cpp | 17 SkPoint pts[] = { {56, 20}, {200, 20}, {90, 190} }; in REG_FIDDLE() local 19 path.moveTo(pts[0]); in REG_FIDDLE() 20 path.arcTo(pts[1], pts[2], radius); in REG_FIDDLE() 21 canvas->drawLine(pts[0], pts[1], tangentPaint); in REG_FIDDLE() 22 canvas->drawLine(pts[1], pts[2], tangentPaint); in REG_FIDDLE() 25 SkVector radial = pts[2] - pts[ in REG_FIDDLE() [all...] |
H A D | Path_arcTo_2_b.cpp | 17 SkPoint pts[] = { {156, 20}, {200, 20}, {170, 50} }; in REG_FIDDLE() local 19 path.moveTo(pts[0]); in REG_FIDDLE() 20 path.arcTo(pts[1], pts[2], radius); in REG_FIDDLE() 21 canvas->drawLine(pts[0], pts[1], tangentPaint); in REG_FIDDLE() 22 canvas->drawLine(pts[1], pts[2], tangentPaint); in REG_FIDDLE() 25 SkVector radial = pts[2] - pts[ in REG_FIDDLE() [all...] |
H A D | Miter_Limit.cpp | 7 SkPoint pts[] = {{ 10, 50 }, { 110, 80 }, { 10, 110 }}; in REG_FIDDLE() local 8 SkVector v[] = { pts[0] - pts[1], pts[2] - pts[1] }; in REG_FIDDLE() 15 path.moveTo(pts[0]); in REG_FIDDLE() 16 path.lineTo(pts[1]); in REG_FIDDLE() 17 path.lineTo(pts[2]); in REG_FIDDLE() 25 canvas->drawLine(pts[1].fX - miterLength / 2, pts[ in REG_FIDDLE() [all...] |
/third_party/skia/src/effects/ |
H A D | SkCornerPathEffect.cpp | 44 SkPoint pts[4]; variable 58 switch (verb = iter.next(pts)) { 66 moveTo = pts[0]; 69 dst->moveTo(pts[0]); 74 bool drawSegment = ComputeStep(pts[0], pts[1], fRadius, &step); 80 dst->quadTo(pts[0].fX, pts[0].fY, pts[0].fX + step.fX, 81 pts[ [all...] |
/third_party/skia/src/utils/ |
H A D | SkDashPath.cpp | 94 static void adjust_zero_length_line(SkPoint pts[2]) { in adjust_zero_length_line() argument 95 SkASSERT(pts[0] == pts[1]); in adjust_zero_length_line() 96 pts[1].fX += std::max(1.001f, pts[1].fX) * SK_ScalarNearlyZero; in adjust_zero_length_line() 99 static bool clip_line(SkPoint pts[2], const SkRect& bounds, SkScalar intervalLength, in clip_line() argument 101 SkVector dxy = pts[1] - pts[0]; in clip_line() 109 SkScalar minXY = (&pts[0].fX)[xyOffset]; in clip_line() 110 SkScalar maxXY = (&pts[ in clip_line() [all...] |