/external/skia/src/core/ |
D | SkEdgeClipper.cpp | 74 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY() 75 return chopMonoQuadAt(pts[0].fY, pts[1].fY, pts[2].fY, y, t); in chopMonoQuadAtY() 78 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX() 79 return chopMonoQuadAt(pts[0].fX, pts[1].fX, pts[2].fX, x, t); in chopMonoQuadAtX() 83 static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { in chop_quad_in_Y() 88 if (pts[0].fY < clip.fTop) { in chop_quad_in_Y() 89 if (chopMonoQuadAtY(pts, clip.fTop, &t)) { in chop_quad_in_Y() 91 SkChopQuadAt(pts, tmp, t); in chop_quad_in_Y() 94 pts[0] = tmp[2]; in chop_quad_in_Y() 95 pts[1] = tmp[3]; in chop_quad_in_Y() [all …]
|
D | SkStroke.cpp | 117 void quad_to(const SkPoint pts[3], 121 void cubic_to(const SkPoint pts[4], 239 void SkPathStroker::quad_to(const SkPoint pts[3], in quad_to() 243 if (!set_normal_unitnormal(pts[1], pts[2], fRadius, in quad_to() 246 this->line_to(pts[2], normalAB); in quad_to() 256 SkChopQuadAtHalf(pts, tmp); in quad_to() 261 SkAssertResult(set_normal_unitnormal(pts[0], pts[2], fRadius, in quad_to() 264 fOuter.quadTo( pts[1].fX + normalB.fX, pts[1].fY + normalB.fY, in quad_to() 265 pts[2].fX + normalBC->fX, pts[2].fY + normalBC->fY); in quad_to() 266 fInner.quadTo( pts[1].fX - normalB.fX, pts[1].fY - normalB.fY, in quad_to() [all …]
|
D | SkPath.cpp | 75 static void compute_pt_bounds(SkRect* bounds, const SkTDArray<SkPoint>& pts) { in compute_pt_bounds() argument 76 if (pts.count() <= 1) { // we ignore just 1 point (moveto) in compute_pt_bounds() 79 bounds->set(pts.begin(), pts.count()); in compute_pt_bounds() 324 SkPoint* pts = fPts.append(2); in quadTo() local 325 pts[0].set(x1, y1); in quadTo() 326 pts[1].set(x2, y2); in quadTo() 347 SkPoint* pts = fPts.append(3); in cubicTo() local 348 pts[0].set(x1, y1); in cubicTo() 349 pts[1].set(x2, y2); in cubicTo() 350 pts[2].set(x3, y3); in cubicTo() [all …]
|
D | SkEdgeBuilder.cpp | 16 void SkEdgeBuilder::addLine(const SkPoint pts[]) { in addLine() argument 18 if (edge->setLine(pts[0], pts[1], NULL, fShiftUp)) { in addLine() 25 void SkEdgeBuilder::addQuad(const SkPoint pts[]) { in addQuad() argument 27 if (edge->setQuadratic(pts, fShiftUp)) { in addQuad() 34 void SkEdgeBuilder::addCubic(const SkPoint pts[]) { in addCubic() argument 36 if (edge->setCubic(pts, NULL, fShiftUp)) { in addCubic() 44 SkPoint pts[4]; in addClipper() local 47 while ((verb = clipper->next(pts)) != SkPath::kDone_Verb) { in addClipper() 50 this->addLine(pts); in addClipper() 53 this->addQuad(pts); in addClipper() [all …]
|
D | SkPathMeasure.cpp | 78 static bool quad_too_curvy(const SkPoint pts[3]) { in quad_too_curvy() 81 SkScalar dx = SkScalarHalf(pts[1].fX) - in quad_too_curvy() 82 SkScalarHalf(SkScalarHalf(pts[0].fX + pts[2].fX)); in quad_too_curvy() 83 SkScalar dy = SkScalarHalf(pts[1].fY) - in quad_too_curvy() 84 SkScalarHalf(SkScalarHalf(pts[0].fY + pts[2].fY)); in quad_too_curvy() 97 static bool cubic_too_curvy(const SkPoint pts[4]) { in cubic_too_curvy() 98 return cheap_dist_exceeds_limit(pts[1], in cubic_too_curvy() 99 SkScalarInterp(pts[0].fX, pts[3].fX, SK_Scalar1/3), in cubic_too_curvy() 100 SkScalarInterp(pts[0].fY, pts[3].fY, SK_Scalar1/3)) in cubic_too_curvy() 102 cheap_dist_exceeds_limit(pts[2], in cubic_too_curvy() [all …]
|
D | SkScan_Hairline.cpp | 49 SkPoint pts[2] = { pt0, pt1 }; in HairLine() local 55 if (!SkLineClipper::IntersectLine(pts, r, pts)) { in HairLine() 60 SkFDot6 x0 = SkScalarToFDot6(pts[0].fX); in HairLine() 61 SkFDot6 y0 = SkScalarToFDot6(pts[0].fY); in HairLine() 62 SkFDot6 x1 = SkScalarToFDot6(pts[1].fX); in HairLine() 63 SkFDot6 y1 = SkScalarToFDot6(pts[1].fY); in HairLine() 172 static bool quad_too_curvy(const SkPoint pts[3]) { in quad_too_curvy() 176 static int compute_int_quad_dist(const SkPoint pts[3]) { in compute_int_quad_dist() 179 SkScalar dx = SkScalarHalf(pts[0].fX + pts[2].fX) - pts[1].fX; in compute_int_quad_dist() 180 SkScalar dy = SkScalarHalf(pts[0].fY + pts[2].fY) - pts[1].fY; in compute_int_quad_dist() [all …]
|
D | SkEdge.cpp | 176 int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift) in setQuadratic() 183 x0 = int(pts[0].fX * scale); in setQuadratic() 184 y0 = int(pts[0].fY * scale); in setQuadratic() 185 x1 = int(pts[1].fX * scale); in setQuadratic() 186 y1 = int(pts[1].fY * scale); in setQuadratic() 187 x2 = int(pts[2].fX * scale); in setQuadratic() 188 y2 = int(pts[2].fY * scale); in setQuadratic() 191 x0 = pts[0].fX >> shift; in setQuadratic() 192 y0 = pts[0].fY >> shift; in setQuadratic() 193 x1 = pts[1].fX >> shift; in setQuadratic() [all …]
|
D | SkQuadClipper.h | 46 bool clipQuad(const SkPoint pts[3], const SkRect& clip); 47 bool clipCubic(const SkPoint pts[4], const SkRect& clip); 49 SkPath::Verb next(SkPoint pts[]); 65 void appendQuad(const SkPoint pts[3], bool reverse); 66 void appendCubic(const SkPoint pts[4], bool reverse); 70 void sk_assert_monotonic_x(const SkPoint pts[], int count); 71 void sk_assert_monotonic_y(const SkPoint pts[], int count); 73 #define sk_assert_monotonic_x(pts, count) argument 74 #define sk_assert_monotonic_y(pts, count) argument
|
/external/skia/samplecode/ |
D | SampleGradients.cpp | 8 SkPoint pts[] = { { r.fLeft, r.fTop }, { r.fRight, r.fTop } }; in setgrad() local 9 return SkGradientShader::CreateLinear(pts, colors, NULL, 2, in setgrad() 60 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() 62 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, in MakeLinear() 66 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() 69 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 70 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 75 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep() 78 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 79 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() [all …]
|
D | SampleShaderText.cpp | 14 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, in MakeLinear() 59 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, in MakeLinear() 63 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() 66 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 67 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 72 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep() 75 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 76 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() [all …]
|
D | SampleHairline.cpp | 43 static void generate_pts(SkPoint pts[], int count, int w, int h) { in generate_pts() argument 45 pts[i].set(gRand.nextUScalar1() * 3 * w - SkIntToScalar(w), in generate_pts() 89 SkPoint pts[N]; in line_proc() local 91 generate_pts(pts, N, WIDTH, HEIGHT); in line_proc() 93 canvas->drawLine(pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY, paint); in line_proc() 96 pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY); in line_proc() 105 SkPoint pts[N]; in poly_proc() local 107 generate_pts(pts, N, WIDTH, HEIGHT); in poly_proc() 110 path.moveTo(pts[0]); in poly_proc() 112 path.lineTo(pts[j]); in poly_proc() [all …]
|
D | SampleLineClipper.cpp | 22 static int test0(SkPoint pts[], SkRect* clip) { in test0() argument 23 pts[0].set(200000, 140); in test0() 24 pts[1].set(-740000, 483); in test0() 25 pts[2].set(1.00000102e-06f, 9.10000017e-05f); in test0() 32 static void drawQuad(SkCanvas* canvas, const SkPoint pts[3], const SkPaint& p) { in drawQuad() 34 path.moveTo(pts[0]); in drawQuad() 35 path.quadTo(pts[1], pts[2]); in drawQuad() 39 static void drawCubic(SkCanvas* canvas, const SkPoint pts[4], const SkPaint& p) { in drawCubic() 41 path.moveTo(pts[0]); in drawCubic() 42 path.cubicTo(pts[1], pts[2], pts[3]); in drawCubic() [all …]
|
D | SampleCull.cpp | 13 static void addbump(SkPath* path, const SkPoint pts[2], SkScalar bump) { in addbump() 16 tang.setLength(pts[1].fX - pts[0].fX, pts[1].fY - pts[0].fY, bump); in addbump() 18 path->lineTo(SkScalarHalf(pts[0].fX + pts[1].fX) - tang.fY, in addbump() 19 SkScalarHalf(pts[0].fY + pts[1].fY) + tang.fX); in addbump() 20 path->lineTo(pts[1]); in addbump() 25 SkPoint pts[4]; in subdivide() local 29 switch (iter.next(pts)) { in subdivide() 31 tmp.moveTo(pts[0]); in subdivide() 34 addbump(&tmp, pts, bump); in subdivide() 48 SkPoint pts[4]; in getpts() local [all …]
|
D | SamplePoints.cpp | 37 static void fill_pts(SkPoint pts[], size_t n, SkRandom* rand) { in fill_pts() argument 39 pts[i].set(rand->nextUScalar1() * 640, rand->nextUScalar1() * 480); in fill_pts() 58 SkPoint* pts = new SkPoint[n]; in onDrawContent() local 59 fill_pts(pts, n, &rand); in onDrawContent() 61 canvas->drawPoints(SkCanvas::kPolygon_PointMode, n, pts, p0); in onDrawContent() 62 canvas->drawPoints(SkCanvas::kLines_PointMode, n, pts, p1); in onDrawContent() 63 canvas->drawPoints(SkCanvas::kPoints_PointMode, n, pts, p2); in onDrawContent() 64 canvas->drawPoints(SkCanvas::kPoints_PointMode, n, pts, p3); in onDrawContent() 66 delete[] pts; in onDrawContent()
|
D | SampleEffects.cpp | 14 SkPoint pts[] = { in test_edgeclipper() local 23 clipper.clipCubic(pts, clip); in test_edgeclipper() 47 SkPoint pts[] = { { 3, 0 }, { 7, 5 } }; in paint_proc3() local 48 paint->setShader(SkGradientShader::CreateLinear(pts, colors, NULL, SK_ARRAY_COUNT(colors), in paint_proc3() 75 const float pts[] = { in EffectsView() local 84 fPath.moveTo(pts[0], pts[1]); in EffectsView() 85 for (i = 2; i < SK_ARRAY_COUNT(pts); i += 2) { in EffectsView() 86 fPath.lineTo(pts[i], pts[i+1]); in EffectsView()
|
D | SampleShaders.cpp | 21 SkPoint pts[2]; in make_bitmapfade() local 24 pts[0].set(0, 0); in make_bitmapfade() 25 pts[1].set(0, SkIntToScalar(bm.height())); in make_bitmapfade() 28 …SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp_TileMode… in make_bitmapfade() 51 SkPoint pts[2]; in ShaderView() local 54 pts[0].set(0, 0); in ShaderView() 55 pts[1].set(SkIntToScalar(100), 0); in ShaderView() 58 …SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp_TileMode… in ShaderView() 60 pts[0].set(0, 0); in ShaderView() 61 pts[1].set(0, SkIntToScalar(100)); in ShaderView() [all …]
|
/external/skia/gm/ |
D | gradients.cpp | 29 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() 31 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, in MakeLinear() 35 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() 38 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 39 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 44 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep() 47 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 48 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() 53 static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data, in Make2Radial() 56 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2Radial() [all …]
|
D | shadertext.cpp | 15 SkPoint pts[] = { { 0, 0 }, { s, s } }; in makebm() local 27 paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos, in makebm() 58 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() 60 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, in MakeLinear() 64 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() 67 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 68 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 73 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep() 76 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeSweep() 77 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeSweep() [all …]
|
D | points.cpp | 23 static void fill_pts(SkPoint pts[], size_t n, SkRandom* rand) { in fill_pts() argument 25 pts[i].set(rand->nextUScalar1() * 640, rand->nextUScalar1() * 480); in fill_pts() 46 SkPoint* pts = new SkPoint[n]; in onDraw() local 47 fill_pts(pts, n, &rand); in onDraw() 49 canvas->drawPoints(SkCanvas::kPolygon_PointMode, n, pts, p0); in onDraw() 50 canvas->drawPoints(SkCanvas::kLines_PointMode, n, pts, p1); in onDraw() 51 canvas->drawPoints(SkCanvas::kPoints_PointMode, n, pts, p2); in onDraw() 52 canvas->drawPoints(SkCanvas::kPoints_PointMode, n, pts, p3); in onDraw() 54 delete[] pts; in onDraw()
|
/external/skia/bench/ |
D | GradientBench.cpp | 34 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() 36 return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, in MakeLinear() 40 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() 43 center.set(SkScalarAve(pts[0].fX, pts[1].fX), in MakeRadial() 44 SkScalarAve(pts[0].fY, pts[1].fY)); in MakeRadial() 49 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, 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 static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data, in Make2Radial() 61 center0.set(SkScalarAve(pts[0].fX, pts[1].fX), in Make2Radial() [all …]
|
/external/skia/src/effects/ |
D | SkCornerPathEffect.cpp | 54 SkPoint pts[4]; in filterPath() local 67 switch (verb = iter.next(pts)) { in filterPath() 75 moveTo = pts[0]; in filterPath() 78 dst->moveTo(pts[0]); in filterPath() 83 bool drawSegment = ComputeStep(pts[0], pts[1], fRadius, &step); in filterPath() 89 dst->quadTo(pts[0].fX, pts[0].fY, pts[0].fX + step.fX, in filterPath() 90 pts[0].fY + step.fY); in filterPath() 93 dst->lineTo(pts[1].fX - step.fX, pts[1].fY - step.fY); in filterPath() 95 lastCorner = pts[1]; in filterPath() 102 dst->moveTo(pts[0]); in filterPath() [all …]
|
/external/quake/quake/src/QW/client/ |
D | gl_test.c | 103 vec3_t pts[2][3]; in DrawPuff() local 122 pts[i][0][j] = p->origin[j] + p->up[j]*s + p->reflect[j]*d; in DrawPuff() 123 pts[i][1][j] = p->origin[j] + p->right[j]*s + p->reflect[j]*d; in DrawPuff() 124 pts[i][2][j] = p->origin[j] + -p->right[j]*s + p->reflect[j]*d; in DrawPuff() 137 glVertex3fv (pts[0][0]); in DrawPuff() 138 glVertex3fv (pts[1][0]); in DrawPuff() 140 glVertex3fv (pts[0][1]); in DrawPuff() 141 glVertex3fv (pts[1][1]); in DrawPuff() 143 glVertex3fv (pts[0][2]); in DrawPuff() 144 glVertex3fv (pts[1][2]); in DrawPuff() [all …]
|
/external/quake/quake/src/WinQuake/ |
D | gl_test.cpp | 103 vec3_t pts[2][3]; in DrawPuff() local 122 pts[i][0][j] = p->origin[j] + p->up[j]*s + p->reflect[j]*d; in DrawPuff() 123 pts[i][1][j] = p->origin[j] + p->right[j]*s + p->reflect[j]*d; in DrawPuff() 124 pts[i][2][j] = p->origin[j] + -p->right[j]*s + p->reflect[j]*d; in DrawPuff() 137 glVertex3fv (pts[0][0]); in DrawPuff() 138 glVertex3fv (pts[1][0]); in DrawPuff() 140 glVertex3fv (pts[0][1]); in DrawPuff() 141 glVertex3fv (pts[1][1]); in DrawPuff() 143 glVertex3fv (pts[0][2]); in DrawPuff() 144 glVertex3fv (pts[1][2]); in DrawPuff() [all …]
|
/external/skia/gpu/src/ |
D | GrDrawMesh.cpp | 49 SkPoint* pts = fPts; in init() local 59 pts->set(bounds.fLeft + x*dx, bounds.fTop + y*dy); in init() 60 pts += 1; in init() 96 static void set_cubic(SkPoint pts[4], SkScalar x0, SkScalar y0, in set_cubic() 100 pts[0].set(x0, y0); in set_cubic() 101 pts[3].set(x3, y3); in set_cubic() 103 tmp = SkPointInterp(pts[0], pts[3], SK_Scalar1/3); in set_cubic() 104 tmp2 = pts[0] - tmp; in set_cubic() 107 pts[1] = tmp + tmp2; in set_cubic() 109 tmp = SkPointInterp(pts[0], pts[3], 2*SK_Scalar1/3); in set_cubic() [all …]
|
/external/skia/include/core/ |
D | SkEdgeClipper.h | 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[]); 46 void appendQuad(const SkPoint pts[3], bool reverse); 47 void appendCubic(const SkPoint pts[4], bool reverse); 51 void sk_assert_monotonic_x(const SkPoint pts[], int count); 52 void sk_assert_monotonic_y(const SkPoint pts[], int count); 54 #define sk_assert_monotonic_x(pts, count) argument 55 #define sk_assert_monotonic_y(pts, count) argument
|