/external/skia/samplecode/ |
D | SampleHairCurves.cpp | 43 SkScalar pts[] = { in onDrawContent() local 49 curves.moveTo(pts[0], pts[1]); in onDrawContent() 50 curves.cubicTo(pts[2], pts[3], in onDrawContent() 51 pts[4], pts[5], in onDrawContent() 52 pts[6], pts[7]); in onDrawContent() 54 hulls.moveTo(pts[0], pts[1]); in onDrawContent() 55 hulls.lineTo(pts[2], pts[3]); in onDrawContent() 56 hulls.lineTo(pts[4], pts[5]); in onDrawContent() 57 hulls.lineTo(pts[6], pts[7]); in onDrawContent() 59 ctrlPts.addCircle(pts[0], pts[1], SK_Scalar1 / 200); in onDrawContent() [all …]
|
D | SampleGradients.cpp | 15 SkPoint pts[] = { { r.fLeft, r.fTop }, { r.fRight, r.fTop } }; in setgrad() local 16 return SkGradientShader::CreateLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in setgrad() 66 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear() 67 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, data.fCount, tm); in MakeLinear() 70 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial() 72 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 73 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 78 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeSweep() 80 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 81 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() [all …]
|
D | SampleHairline.cpp | 34 static void generate_pts(SkPoint pts[], int count, int w, int h) { in generate_pts() argument 36 pts[i].set(gRand.nextUScalar1() * 3 * w - SkIntToScalar(w), in generate_pts() 81 SkPoint pts[N]; in line_proc() local 83 generate_pts(pts, N, WIDTH, HEIGHT); in line_proc() 85 canvas->drawLine(pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY, paint); in line_proc() 88 pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY); in line_proc() 97 SkPoint pts[N]; in poly_proc() local 99 generate_pts(pts, N, WIDTH, HEIGHT); in poly_proc() 102 path.moveTo(pts[0]); in poly_proc() 104 path.lineTo(pts[j]); in poly_proc() [all …]
|
D | SampleShaderText.cpp | 20 SkPoint pts[] = { { 0, 0 }, { s, s } }; in makebm() local 26 paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos, in makebm() 57 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear() 58 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, data.fCount, tm); in MakeLinear() 61 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial() 63 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 64 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 69 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeSweep() 71 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 72 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() [all …]
|
D | SampleFatBits.cpp | 29 static void apply_grid(SkPoint pts[], int count) { in apply_grid() argument 31 pts[i].set(apply_grid(pts[i].fX), apply_grid(pts[i].fY)); in apply_grid() 102 void drawLine(SkCanvas*, SkPoint pts[2]); 103 void drawRect(SkCanvas* canvas, SkPoint pts[2]); 104 void drawTriangle(SkCanvas* canvas, SkPoint pts[3]); 139 void drawTriangleSkeleton(SkCanvas* max, const SkPoint pts[]); 140 void drawLineSkeleton(SkCanvas* max, const SkPoint pts[]); 230 void FatBits::drawLineSkeleton(SkCanvas* max, const SkPoint pts[]) { in drawLineSkeleton() argument 235 path.moveTo(pts[0]); in drawLineSkeleton() 236 path.lineTo(pts[1]); in drawLineSkeleton() [all …]
|
/external/skia/src/pathops/ |
D | SkAddIntersections.cpp | 13 static void debugShowLineIntersection(int pts, const SkIntersectionHelper& wt, in debugShowLineIntersection() argument 15 SkASSERT(i.used() == pts); in debugShowLineIntersection() 16 if (!pts) { in debugShowLineIntersection() 18 __FUNCTION__, LINE_DEBUG_DATA(wt.pts()), LINE_DEBUG_DATA(wn.pts())); in debugShowLineIntersection() 22 i[0][0], LINE_DEBUG_DATA(wt.pts()), PT_DEBUG_DATA(i, 0)); in debugShowLineIntersection() 23 if (pts == 2) { in debugShowLineIntersection() 26 SkDebugf(" wnTs[0]=%g " LINE_DEBUG_STR, i[1][0], LINE_DEBUG_DATA(wn.pts())); in debugShowLineIntersection() 27 if (pts == 2) { in debugShowLineIntersection() 33 static void debugShowQuadLineIntersection(int pts, const SkIntersectionHelper& wt, in debugShowQuadLineIntersection() argument 36 SkASSERT(i.used() == pts); in debugShowQuadLineIntersection() [all …]
|
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[3].fY) { in cubicEndPoints() 71 void cubicEndPoints(const SkDCubic& pts, int s, int e) { in cubicEndPoints() argument 72 fA = pts[s].fY - pts[e].fY; in cubicEndPoints() 73 fB = pts[e].fX - pts[s].fX; in cubicEndPoints() [all …]
|
D | SkOpEdgeBuilder.cpp | 79 SkPoint pts[4]; in preFetch() local 83 verb = iter.next(pts); in preFetch() 90 force_small_to_zero(&pts[0]); in preFetch() 91 *fPathPts.append() = pts[0]; in preFetch() 92 curveStart = curve[0] = pts[0]; in preFetch() 96 force_small_to_zero(&pts[1]); in preFetch() 97 if (SkDPoint::ApproximatelyEqual(curve[0], pts[1])) { in preFetch() 100 fPathPts.top() = pts[1]; in preFetch() 106 force_small_to_zero(&pts[1]); in preFetch() 107 force_small_to_zero(&pts[2]); in preFetch() [all …]
|
/external/skia/gm/ |
D | gradients_2pt_conical.cpp | 40 static SkShader* Make2ConicalOutside(const SkPoint pts[2], const GradData& data, in Make2ConicalOutside() 43 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutside() 44 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutside() 45 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutside() 46 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutside() 53 static SkShader* Make2ConicalOutsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalOutsideFlip() 56 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutsideFlip() 57 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutsideFlip() 58 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutsideFlip() 59 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutsideFlip() [all …]
|
D | shadertext.cpp | 21 SkPoint pts[] = { { 0, 0 }, { s, s } }; in makebm() local 27 paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos, in makebm() 49 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear() 50 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, data.fCount, tm); in MakeLinear() 53 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial() 55 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 56 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 61 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode) { in MakeSweep() 63 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 64 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() [all …]
|
D | gradients_no_texture.cpp | 29 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear() 30 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, data.fCount, tm); in MakeLinear() 33 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial() 35 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 36 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 41 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode) { in MakeSweep() 43 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 44 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() 48 static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in Make2Radial() 50 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2Radial() [all …]
|
D | gradientDirtyLaundry.cpp | 38 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear() 39 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, data.fCount, tm); in MakeLinear() 42 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial() 44 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 45 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 50 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode) { in MakeSweep() 52 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 53 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() 58 typedef SkShader* (*GradMaker)(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm); 77 SkPoint pts[2] = { { 0, 0 }, in onDraw() local [all …]
|
/external/skia/src/core/ |
D | SkEdgeClipper.cpp | 67 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY() 68 return chopMonoQuadAt(pts[0].fY, pts[1].fY, pts[2].fY, y, t); in chopMonoQuadAtY() 71 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX() 72 return chopMonoQuadAt(pts[0].fX, pts[1].fX, pts[2].fX, x, t); in chopMonoQuadAtX() 76 static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { in chop_quad_in_Y() 81 if (pts[0].fY < clip.fTop) { in chop_quad_in_Y() 82 if (chopMonoQuadAtY(pts, clip.fTop, &t)) { in chop_quad_in_Y() 84 SkChopQuadAt(pts, tmp, t); in chop_quad_in_Y() 89 pts[0] = tmp[2]; in chop_quad_in_Y() 90 pts[1] = tmp[3]; in chop_quad_in_Y() [all …]
|
D | SkPathMeasure.cpp | 56 bool SkPathMeasure::quad_too_curvy(const SkPoint pts[3]) { in quad_too_curvy() 59 SkScalar dx = SkScalarHalf(pts[1].fX) - in quad_too_curvy() 60 SkScalarHalf(SkScalarHalf(pts[0].fX + pts[2].fX)); in quad_too_curvy() 61 SkScalar dy = SkScalarHalf(pts[1].fY) - in quad_too_curvy() 62 SkScalarHalf(SkScalarHalf(pts[0].fY + pts[2].fY)); in quad_too_curvy() 84 bool SkPathMeasure::cubic_too_curvy(const SkPoint pts[4]) { in cubic_too_curvy() 85 return cheap_dist_exceeds_limit(pts[1], in cubic_too_curvy() 86 SkScalarInterp(pts[0].fX, pts[3].fX, SK_Scalar1/3), in cubic_too_curvy() 87 SkScalarInterp(pts[0].fY, pts[3].fY, SK_Scalar1/3)) in cubic_too_curvy() 89 cheap_dist_exceeds_limit(pts[2], in cubic_too_curvy() [all …]
|
D | SkPath.cpp | 33 SkPoint pts[4]; in is_degenerate() local 34 return SkPath::kDone_Verb == iter.next(pts); in is_degenerate() 268 SkPoint pts[4]; in conservativelyContainsRect() local 273 while ((verb = iter.next(pts)) != kDone_Verb) { in conservativelyContainsRect() 279 firstPt = prevPt = pts[0]; in conservativelyContainsRect() 306 orig.set(pts, iter.conicWeight()); in conservativelyContainsRect() 318 if (!check_edge_against_rect(prevPt, pts[nextPt], rect, direction)) { in conservativelyContainsRect() 322 prevPt = pts[nextPt]; in conservativelyContainsRect() 368 const SkPoint* pts = fPathRef->points(); in isLine() local 369 line[0] = pts[0]; in isLine() [all …]
|
D | SkScan_Hairline.cpp | 57 SkPoint pts[2]; in HairLineRgn() local 61 if (!SkLineClipper::IntersectLine(&array[i], fixedBounds, pts)) { in HairLineRgn() 67 if (clip && !SkLineClipper::IntersectLine(pts, clipBounds, pts)) { in HairLineRgn() 71 SkFDot6 x0 = SkScalarToFDot6(pts[0].fX); in HairLineRgn() 72 SkFDot6 y0 = SkScalarToFDot6(pts[0].fY); in HairLineRgn() 73 SkFDot6 x1 = SkScalarToFDot6(pts[1].fX); in HairLineRgn() 74 SkFDot6 y1 = SkScalarToFDot6(pts[1].fY); in HairLineRgn() 198 static int compute_int_quad_dist(const SkPoint pts[3]) { in compute_int_quad_dist() 201 SkScalar dx = SkScalarHalf(pts[0].fX + pts[2].fX) - pts[1].fX; in compute_int_quad_dist() 202 SkScalar dy = SkScalarHalf(pts[0].fY + pts[2].fY) - pts[1].fY; in compute_int_quad_dist() [all …]
|
D | SkEdgeBuilder.cpp | 70 void SkEdgeBuilder::addLine(const SkPoint pts[]) { in addLine() argument 72 if (edge->setLine(pts[0], pts[1], fShiftUp)) { in addLine() 90 void SkEdgeBuilder::addQuad(const SkPoint pts[]) { in addQuad() argument 92 if (edge->setQuadratic(pts, fShiftUp)) { in addQuad() 99 void SkEdgeBuilder::addCubic(const SkPoint pts[]) { in addCubic() argument 101 if (edge->setCubic(pts, fShiftUp)) { in addCubic() 109 SkPoint pts[4]; in addClipper() local 112 while ((verb = clipper->next(pts)) != SkPath::kDone_Verb) { in addClipper() 115 this->addLine(pts); in addClipper() 118 this->addQuad(pts); in addClipper() [all …]
|
/external/skia/src/effects/ |
D | SkCornerPathEffect.cpp | 41 SkPoint pts[4]; in filterPath() local 55 switch (verb = iter.next(pts, false)) { in filterPath() 63 moveTo = pts[0]; in filterPath() 66 dst->moveTo(pts[0]); in filterPath() 71 bool drawSegment = ComputeStep(pts[0], pts[1], fRadius, &step); in filterPath() 77 dst->quadTo(pts[0].fX, pts[0].fY, pts[0].fX + step.fX, in filterPath() 78 pts[0].fY + step.fY); in filterPath() 81 dst->lineTo(pts[1].fX - step.fX, pts[1].fY - step.fY); in filterPath() 83 lastCorner = pts[1]; in filterPath() 90 dst->moveTo(pts[0]); in filterPath() [all …]
|
D | SkArcToPathEffect.cpp | 20 SkPoint pts[4]; in filterPath() local 26 switch (verb = iter.next(pts, false)) { in filterPath() 31 dst->moveTo(pts[0]); in filterPath() 35 dst->arcTo(pts[0], pts[1], fRadius); in filterPath() 37 lastCorner = pts[1]; in filterPath() 40 dst->quadTo(pts[1], pts[2]); in filterPath() 41 lastCorner = pts[2]; in filterPath() 44 dst->conicTo(pts[1], pts[2], iter.conicWeight()); in filterPath() 45 lastCorner = pts[2]; in filterPath() 48 dst->cubicTo(pts[1], pts[2], pts[3]); in filterPath() [all …]
|
/external/skia/bench/ |
D | GradientBench.cpp | 50 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() 53 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, in MakeLinear() 57 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() 60 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 61 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 68 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep() 71 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 72 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() 78 static SkShader* MakeConical(const SkPoint pts[2], const GradData& data, in MakeConical() 81 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeConical() [all …]
|
D | PathIterBench.cpp | 18 static int rand_pts(SkRandom& rand, SkPoint pts[4]) { in rand_pts() 23 pts[i].fX = rand.nextSScalar1(); in rand_pts() 24 pts[i].fY = rand.nextSScalar1(); in rand_pts() 41 SkPoint pts[4]; in PathIterBench() local 42 int n = rand_pts(rand, pts); in PathIterBench() 45 fPath.moveTo(pts[0]); in PathIterBench() 48 fPath.lineTo(pts[1]); in PathIterBench() 51 fPath.quadTo(pts[1], pts[2]); in PathIterBench() 54 fPath.cubicTo(pts[1], pts[2], pts[3]); in PathIterBench() 74 SkPoint pts[4]; in onDraw() local [all …]
|
/external/skia/tests/ |
D | SubsetPath.cpp | 65 SkPoint pts[4]; in SubsetContours() local 68 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { in SubsetContours() 102 SkPoint pts[4]; in getSubsetPath() local 106 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { in getSubsetPath() 108 result.moveTo(pts[0]); in getSubsetPath() 116 result.lineTo(pts[1]); in getSubsetPath() 121 result.quadTo(pts[1], pts[2]); in getSubsetPath() 126 result.conicTo(pts[1], pts[2], iter.conicWeight()); in getSubsetPath() 131 result.cubicTo(pts[1], pts[2], pts[3]); in getSubsetPath() 156 SkPoint pts[4]; in SubsetVerbs() local [all …]
|
D | GeometryTest.cpp | 50 SkPoint pts[3]; in test_evalquadat() local 52 pts[j].set(rand.nextSScalar1() * 100, rand.nextSScalar1() * 100); in test_evalquadat() 58 SkEvalQuadAt(pts, t, &r0); in test_evalquadat() 59 SkPoint r1 = SkEvalQuadAt(pts, t); in test_evalquadat() 63 SkEvalQuadAt(pts, t, nullptr, &v0); in test_evalquadat() 64 SkVector v1 = SkEvalQuadTangentAt(pts, t); in test_evalquadat() 89 SkPoint pts[3]; in test_conic() local 91 pts[j].set(rand.nextSScalar1() * 100, rand.nextSScalar1() * 100); in test_conic() 95 SkConic conic(pts, w); in test_conic() 109 SkPoint pts[] = { in test_quad_tangents() local [all …]
|
D | PathOpsTestCommon.cpp | 169 SkPoint pts[4]; in CubicPathToQuads() local 170 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { in CubicPathToQuads() 173 quadPath->moveTo(pts[0].fX, pts[0].fY); in CubicPathToQuads() 176 quadPath->lineTo(pts[1].fX, pts[1].fY); in CubicPathToQuads() 179 quadPath->quadTo(pts[1].fX, pts[1].fY, pts[2].fX, pts[2].fY); in CubicPathToQuads() 183 cubic.set(pts); in CubicPathToQuads() 208 SkPoint pts[4]; in CubicPathToSimple() local 209 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { in CubicPathToSimple() 212 simplePath->moveTo(pts[0].fX, pts[0].fY); in CubicPathToSimple() 215 simplePath->lineTo(pts[1].fX, pts[1].fY); in CubicPathToSimple() [all …]
|
/external/mesa3d/src/gallium/state_trackers/vega/ |
D | api_path.c | 438 VGfloat pts[] = {*minX, *minY, in vegaPathTransformedBounds() 444 matrix_map_point(matrix, pts[0], pts[1], pts + 0, pts + 1); in vegaPathTransformedBounds() 445 matrix_map_point(matrix, pts[2], pts[3], pts + 2, pts + 3); in vegaPathTransformedBounds() 446 matrix_map_point(matrix, pts[4], pts[5], pts + 4, pts + 5); in vegaPathTransformedBounds() 447 matrix_map_point(matrix, pts[6], pts[7], pts + 6, pts + 7); in vegaPathTransformedBounds() 448 *minX = MIN2(pts[0], MIN2(pts[2], MIN2(pts[4], pts[6]))); in vegaPathTransformedBounds() 449 *minY = MIN2(pts[1], MIN2(pts[3], MIN2(pts[5], pts[7]))); in vegaPathTransformedBounds() 450 maxX = MAX2(pts[0], MAX2(pts[2], MAX2(pts[4], pts[6]))); in vegaPathTransformedBounds() 451 maxY = MAX2(pts[1], MAX2(pts[3], MAX2(pts[5], pts[7]))); in vegaPathTransformedBounds()
|