/external/skia/gm/ |
D | degeneratesegments.cpp | 31 typedef SkPoint (*AddSegmentFunc)(SkPath&, SkPoint&); 36 static SkPoint AddMove(SkPath& path, SkPoint& startPt) { in AddMove() 37 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMove() 42 static SkPoint AddMoveClose(SkPath& path, SkPoint& startPt) { in AddMoveClose() 43 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveClose() 49 static SkPoint AddDegenLine(SkPath& path, SkPoint& startPt) { in AddDegenLine() 54 static SkPoint AddMoveDegenLine(SkPath& path, SkPoint& startPt) { in AddMoveDegenLine() 55 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLine() 61 static SkPoint AddMoveDegenLineClose(SkPath& path, SkPoint& startPt) { in AddMoveDegenLineClose() 62 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLineClose() [all …]
|
D | gradients.cpp | 36 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear() 42 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial() 44 SkPoint center; in MakeRadial() 51 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep() 53 SkPoint center; in MakeSweep() 60 static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data, in Make2Radial() 62 SkPoint center0, center1; in Make2Radial() 73 typedef SkShader* (*GradMaker)(const SkPoint pts[2], const GradData& data, 96 SkPoint pts[2] = { in onDraw() 160 SkPoint c0; in onDraw() [all …]
|
/external/skia/include/core/ |
D | SkGeometry.h | 19 typedef SkPoint SkXRay; 27 bool SkXRayCrossesLine(const SkXRay& pt, const SkPoint pts[2], 40 void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, 42 void SkEvalQuadAtHalf(const SkPoint src[3], SkPoint* pt, 49 void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t); 54 void SkChopQuadAtHalf(const SkPoint src[3], SkPoint dst[5]); 72 int SkChopQuadAtYExtrema(const SkPoint src[3], SkPoint dst[5]); 73 int SkChopQuadAtXExtrema(const SkPoint src[3], SkPoint dst[5]); 82 int SkChopQuadAtMaxCurvature(const SkPoint src[3], SkPoint dst[5]); 88 SK_API void SkConvertQuadToCubic(const SkPoint src[3], SkPoint dst[4]); [all …]
|
D | SkPoint.h | 136 struct SK_API SkPoint { struct 139 static SkPoint Make(SkScalar x, SkScalar y) { in Make() argument 140 SkPoint pt; in Make() 167 void setAbs(const SkPoint& pt) { in setAbs() argument 174 SkPoint* v = this; in setIRectFan() argument 184 SkPoint* v = this; in setRectFan() argument 192 static void Offset(SkPoint points[], int count, const SkPoint& offset) { in Offset() argument 196 static void Offset(SkPoint points[], int count, SkScalar dx, SkScalar dy) { in Offset() argument 209 SkScalar length() const { return SkPoint::Length(fX, fY); } in length() argument 249 void scale(SkScalar scale, SkPoint* dst) const; [all …]
|
D | SkMatrix.h | 333 bool setPolyToPoly(const SkPoint src[], const SkPoint dst[], int count); 365 void mapPoints(SkPoint dst[], const SkPoint src[], int count) const; 374 void mapPoints(SkPoint pts[], int count) const { in mapPoints() 381 void mapPointsWithStride(SkPoint pts[], size_t stride, int count) const { in mapPointsWithStride() 382 SkASSERT(stride >= sizeof(SkPoint)); in mapPointsWithStride() 386 pts = (SkPoint*)((intptr_t)pts + stride); in mapPointsWithStride() 392 void mapPointsWithStride(SkPoint dst[], SkPoint src[], in mapPointsWithStride() 394 SkASSERT(stride >= sizeof(SkPoint)); in mapPointsWithStride() 398 src = (SkPoint*)((intptr_t)src + stride); in mapPointsWithStride() 399 dst = (SkPoint*)((intptr_t)dst + stride); in mapPointsWithStride() [all …]
|
D | SkPath.h | 187 static bool IsLineDegenerate(const SkPoint& p1, const SkPoint& p2) { in IsLineDegenerate() 195 static bool IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2, in IsQuadDegenerate() 196 const SkPoint& p3) { in IsQuadDegenerate() 205 static bool IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2, in IsCubicDegenerate() 206 const SkPoint& p3, const SkPoint& p4) { in IsCubicDegenerate() 232 SkPoint getPoint(int index) const; 240 int getPoints(SkPoint points[], int max) const; 288 void moveTo(const SkPoint& p) { in moveTo() 318 void lineTo(const SkPoint& p) { in lineTo() 351 void quadTo(const SkPoint& p1, const SkPoint& p2) { in quadTo() [all …]
|
D | SkEdgeClipper.h | 20 bool clipQuad(const SkPoint pts[3], const SkRect& clip); 21 bool clipCubic(const SkPoint pts[4], const SkRect& clip); 23 SkPath::Verb next(SkPoint pts[]); 26 SkPoint* fCurrPoint; 33 SkPoint fPoints[kMaxPoints]; 36 void clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip); 37 void clipMonoCubic(const SkPoint srcPts[4], const SkRect& clip); 39 void appendQuad(const SkPoint pts[3], bool reverse); 40 void appendCubic(const SkPoint pts[4], bool reverse); 44 void sk_assert_monotonic_x(const SkPoint pts[], int count); [all …]
|
D | SkScan.h | 50 static void FrameRect(const SkRect&, const SkPoint& strokeSize, 52 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, 54 static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter*); 55 static void HairLine(const SkPoint&, const SkPoint&, const SkRasterClip&, 57 static void AntiHairLine(const SkPoint&, const SkPoint&, const SkRasterClip&, 87 static void FillTriangle(const SkPoint pts[], const SkRegion*, SkBlitter*); 89 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, 91 static void HairLineRgn(const SkPoint&, const SkPoint&, const SkRegion*, 93 static void AntiHairLineRgn(const SkPoint&, const SkPoint&, const SkRegion*,
|
/external/skia/src/core/ |
D | SkPoint.cpp | 32 void SkPoint::setIRectFan(int l, int t, int r, int b, size_t stride) { in setIRectFan() 33 SkASSERT(stride >= sizeof(SkPoint)); in setIRectFan() 35 ((SkPoint*)((intptr_t)this + 0 * stride))->set(SkIntToScalar(l), in setIRectFan() 37 ((SkPoint*)((intptr_t)this + 1 * stride))->set(SkIntToScalar(l), in setIRectFan() 39 ((SkPoint*)((intptr_t)this + 2 * stride))->set(SkIntToScalar(r), in setIRectFan() 41 ((SkPoint*)((intptr_t)this + 3 * stride))->set(SkIntToScalar(r), in setIRectFan() 45 void SkPoint::setRectFan(SkScalar l, SkScalar t, SkScalar r, SkScalar b, in setRectFan() 47 SkASSERT(stride >= sizeof(SkPoint)); in setRectFan() 49 ((SkPoint*)((intptr_t)this + 0 * stride))->set(l, t); in setRectFan() 50 ((SkPoint*)((intptr_t)this + 1 * stride))->set(l, b); in setRectFan() [all …]
|
D | SkQuadClipper.h | 27 bool clipQuad(const SkPoint src[3], SkPoint dst[3]); 39 bool clipQuad(const SkPoint pts[3], const SkRect& clip); 40 bool clipCubic(const SkPoint pts[4], const SkRect& clip); 42 SkPath::Verb next(SkPoint pts[]); 45 SkPoint* fCurrPoint; 52 SkPoint fPoints[kMaxPoints]; 55 void clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip); 56 void clipMonoCubic(const SkPoint srcPts[4], const SkRect& clip); 58 void appendQuad(const SkPoint pts[3], bool reverse); 59 void appendCubic(const SkPoint pts[4], bool reverse); [all …]
|
D | SkStroke.cpp | 18 return !SkPoint::CanNormalize(v.fX, v.fY); in degenerate_vector() 31 return SkPoint::DotProduct(norm0, norm1) <= kFlatEnoughNormalDotProd; in normals_too_curvy() 37 return SkPoint::DotProduct(norm0, norm1) <= kTooPinchyNormalDotProd; in normals_too_pinchy() 40 static bool set_normal_unitnormal(const SkPoint& before, const SkPoint& after, in set_normal_unitnormal() 69 void moveTo(const SkPoint&); 70 void lineTo(const SkPoint&); 71 void quadTo(const SkPoint&, const SkPoint&); 72 void cubicTo(const SkPoint&, const SkPoint&, const SkPoint&); 86 SkPoint fFirstPt, fPrevPt; // on original path 87 SkPoint fFirstOuterPt; [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() 67 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY() 71 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX() 76 static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { in chop_quad_in_Y() 78 SkPoint tmp[5]; // for SkChopQuadAt in chop_quad_in_Y() 121 void SkEdgeClipper::clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip) { in clipMonoQuad() 122 SkPoint pts[3]; in clipMonoQuad() 134 SkTSwap<SkPoint>(pts[0], pts[2]); in clipMonoQuad() 152 SkPoint tmp[5]; // for SkChopQuadAt in clipMonoQuad() [all …]
|
D | SkScan_Hairline.cpp | 36 void SkScan::HairLineRgn(const SkPoint& pt0, const SkPoint& pt1, in HairLineRgn() 41 SkPoint pts[2] = { pt0, pt1 }; in HairLineRgn() 171 static bool quad_too_curvy(const SkPoint pts[3]) { in quad_too_curvy() 175 static int compute_int_quad_dist(const SkPoint pts[3]) { in compute_int_quad_dist() 194 static void hairquad(const SkPoint pts[3], const SkRegion* clip, SkBlitter* blitter, int level, in hairquad() 195 … void (*lineproc)(const SkPoint&, const SkPoint&, const SkRegion* clip, SkBlitter*)) in hairquad() argument 200 SkPoint tmp[5]; in hairquad() 212 SkPoint prevPt = pts[0]; in hairquad() 214 SkPoint nextPt; in hairquad() 225 static bool cubic_too_curvy(const SkPoint pts[4]) in cubic_too_curvy() [all …]
|
D | SkGeometry.cpp | 14 bool SkXRayCrossesLine(const SkXRay& pt, const SkPoint pts[2], bool* ambiguous) { in SkXRayCrossesLine() 227 void SkEvalQuadAt(const SkPoint src[3], SkScalar t, SkPoint* pt, SkVector* tangent) in SkEvalQuadAt() 239 void SkEvalQuadAtHalf(const SkPoint src[3], SkPoint* pt, SkVector* tangent) in SkEvalQuadAtHalf() 268 void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t) in SkChopQuadAt() 276 void SkChopQuadAtHalf(const SkPoint src[3], SkPoint dst[5]) in SkChopQuadAtHalf() 315 int SkChopQuadAtYExtrema(const SkPoint src[3], SkPoint dst[5]) in SkChopQuadAtYExtrema() 325 SkPoint s[3] = { 0, 26398, 0, 26331, 0, 20621428 }; in SkChopQuadAtYExtrema() 326 SkPoint d[6]; in SkChopQuadAtYExtrema() 359 int SkChopQuadAtXExtrema(const SkPoint src[3], SkPoint dst[5]) in SkChopQuadAtXExtrema() 397 int SkChopQuadAtMaxCurvature(const SkPoint src[3], SkPoint dst[5]) in SkChopQuadAtMaxCurvature() [all …]
|
/external/skia/samplecode/ |
D | SampleWarp.cpp | 100 static SkPoint SkMakePoint(SkScalar x, SkScalar y) { in SkMakePoint() 101 SkPoint pt; in SkMakePoint() 106 static SkPoint SkPointInterp(const SkPoint& a, const SkPoint& b, SkScalar t) { in SkPointInterp() 113 static void set_cubic(SkPoint pts[4], SkScalar x0, SkScalar y0, in set_cubic() 115 SkPoint tmp, tmp2; in set_cubic() 145 SkPoint pts[Rows * Cols]; in test_patch() 161 const SkPoint& p0, const SkPoint& p1) { in test_drag() 188 SkPoint pts[Rows * Cols]; in test_drag() 223 SkPoint& pt(int row, int col) { in pt() 233 SkPoint* fPts; [all …]
|
D | SamplePatch.cpp | 31 const SkPoint pts[3]) { in drawtriangle() 52 SkPoint pts[] = { { 0, 0, }, in make_shader1() 66 void setPatch(const SkPoint pts[12]) { in setPatch() 67 memcpy(fPts, pts, 12 * sizeof(SkPoint)); in setPatch() 76 SkPoint fPts[13]; 80 static void eval_patch_edge(const SkPoint cubic[], SkPoint samples[], int segs) { in eval_patch_edge() 91 static void eval_sheet(const SkPoint edge[], int nu, int nv, int iu, int iv, in eval_sheet() 92 SkPoint* pt) { in eval_sheet() 145 SkAutoSTMalloc<16, SkPoint> storage(npts + 1); in draw() 146 SkPoint* edge0 = storage.get(); in draw() [all …]
|
D | SampleLineClipper.cpp | 29 static int test0(SkPoint pts[], SkRect* clip) { in test0() 39 static void drawQuad(SkCanvas* canvas, const SkPoint pts[3], const SkPaint& p) { in drawQuad() 46 static void drawCubic(SkCanvas* canvas, const SkPoint pts[4], const SkPaint& p) { in drawCubic() 53 typedef void (*clipper_proc)(const SkPoint src[], const SkRect& clip, 56 static void check_clipper(int count, const SkPoint pts[], const SkRect& clip) { in check_clipper() 69 static void line_intersector(const SkPoint src[], const SkRect& clip, in line_intersector() 73 SkPoint dst[2]; in line_intersector() 80 static void line_clipper(const SkPoint src[], const SkRect& clip, in line_clipper() 84 SkPoint dst[SkLineClipper::kMaxPoints]; in line_clipper() 92 static void quad_clipper(const SkPoint src[], const SkRect& clip, in quad_clipper() [all …]
|
D | SampleHairline.cpp | 42 SkPoint pt0 = { SkFloatToScalar(799.33374f), SkFloatToScalar(1.2360189f) }; in test_chromium_9005() 43 SkPoint pt1 = { SkFloatToScalar(808.49969f), SkFloatToScalar(-7.4338055f) }; in test_chromium_9005() 50 static void generate_pts(SkPoint pts[], int count, int w, int h) { in generate_pts() 96 SkPoint pts[N]; in line_proc() 112 SkPoint pts[N]; in poly_proc() 125 static SkPoint ave(const SkPoint& a, const SkPoint& b) { in ave() 126 SkPoint c = a + b; in ave() 135 SkPoint pts[N]; in quad_proc() 150 static void add_cubic(SkPath* path, const SkPoint& mid, const SkPoint& end) { in add_cubic() 151 SkPoint start; in add_cubic() [all …]
|
/external/skia/src/utils/ |
D | SkBoundaryPatch.cpp | 21 static SkPoint SkMakePoint(SkScalar x, SkScalar y) { in SkMakePoint() 22 SkPoint pt; in SkMakePoint() 27 static SkPoint SkPointInterp(const SkPoint& a, const SkPoint& b, SkScalar t) { in SkPointInterp() 32 SkPoint SkBoundaryPatch::eval(SkScalar unitU, SkScalar unitV) { in eval() 34 SkPoint u = SkPointInterp(b->eval(SkBoundary::kLeft, SK_Scalar1 - unitV), in eval() 37 SkPoint v = SkPointInterp(b->eval(SkBoundary::kTop, unitU), in eval() 44 bool SkBoundaryPatch::evalPatch(SkPoint verts[], int rows, int cols) { in evalPatch() 65 SkPoint SkLineBoundary::eval(Edge e, SkScalar t) { in eval() 70 SkPoint SkCubicBoundary::eval(Edge e, SkScalar t) { in eval() 76 SkPoint loc; in eval()
|
/external/skia/include/utils/ |
D | SkBoundaryPatch.h | 24 virtual SkPoint eval(Edge, SkScalar unitInterval) = 0; 35 SkPoint eval(SkScalar unitU, SkScalar unitV); 36 bool evalPatch(SkPoint verts[], int rows, int cols); 46 SkPoint fPts[4]; 49 virtual SkPoint eval(Edge, SkScalar); 55 SkPoint fPts[13]; 58 virtual SkPoint eval(Edge, SkScalar);
|
/external/skia/tests/ |
D | TriangulationTest.cpp | 12 static int GetIndexFromPoint(const SkPoint &pt, in GetIndexFromPoint() 13 int numPts, const SkPoint *pts) { in GetIndexFromPoint() 23 static void PrintTriangles(const SkTDArray<SkPoint> &triangles, in PrintTriangles() 24 int numPts, const SkPoint *pts, in PrintTriangles() 27 SkPoint *p = triangles.begin(); in PrintTriangles() 48 const SkTDArray<SkPoint> &triangles) { in CompareTriangleList() 74 static const SkPoint star[] = { 95 static const SkPoint plus[] = { 109 static const SkPoint zipper[] = { 140 static const SkPoint star[] = { [all …]
|
D | PathCoverageTest.cpp | 39 static inline int estimate_distance(const SkPoint points[]) { in estimate_distance() 44 static inline SkScalar compute_distance(const SkPoint points[]) { in compute_distance() 69 uint32_t quadraticPointCount_EE(const SkPoint points[], SkScalar tol) { in quadraticPointCount_EE() 74 uint32_t quadraticPointCount_EC(const SkPoint points[], SkScalar tol) { in quadraticPointCount_EC() 79 uint32_t quadraticPointCount_CE(const SkPoint points[], SkScalar tol) { in quadraticPointCount_CE() 84 uint32_t quadraticPointCount_CC(const SkPoint points[], SkScalar tol) { in quadraticPointCount_CC() 113 SkPoint path [3]; in one_d_pe() 114 path[1] = SkPoint::Make(SkIntToScalar(array[0]), SkIntToScalar(array[1])); in one_d_pe() 115 path[2] = SkPoint::Make(SkIntToScalar(array[2]), SkIntToScalar(array[3])); in one_d_pe() 120 path[2] = SkPoint::Make(SkIntToScalar(array[i]), in one_d_pe()
|
D | GeometryTest.cpp | 11 static bool nearly_equal(const SkPoint& a, const SkPoint& b) { in nearly_equal() 21 const SkPoint src[] = { in testChopCubic() 27 SkPoint dst[13]; in testChopCubic() 35 SkPoint pts[3], dst[5]; in TestGeometry() 48 const SkPoint cubic[] = { in TestGeometry()
|
/external/skia/src/animator/ |
D | SkParseSVGPath.cpp | 23 static inline void midPt(SkPoint& dest,const SkPoint& a,const SkPoint& b) in midPt() 28 static void quadApprox(SkPath &fPath, const SkPoint &p0, const SkPoint &p1, const SkPoint &p2) in quadApprox() 32 SkPoint c,j,k,l,m,n,o,p,q, mid; in quadApprox() 91 static const char* find_points(const char str[], SkPoint value[], int count, in find_points() 92 bool isRelative, SkPoint* relative) in find_points() 116 SkPoint f = {0, 0}; in parseSVG() 117 SkPoint c = {0, 0}; in parseSVG() 118 SkPoint lastc = {0, 0}; in parseSVG() 119 SkPoint points[3]; in parseSVG() 220 SkPoint args[2]; in parseSVG()
|
/external/skia/src/gpu/ |
D | GrAAHairLinePathRenderer.cpp | 111 typedef SkTArray<SkPoint, true> PtArray; 112 #define PREALLOC_PTARRAY(N) SkSTArray<(N),SkPoint, true> 141 int num_quad_subdivs(const SkPoint p[3]) { in num_quad_subdivs() 220 SkPoint::Offset(pts, 2, translate); in generate_lines_and_quads() 226 SkPoint* pts = lines->push_back_n(2); in generate_lines_and_quads() 232 SkPoint::Offset(pts, 3, translate); in generate_lines_and_quads() 241 SkPoint* pts = lines->push_back_n(4); in generate_lines_and_quads() 248 SkPoint* qPts = persp ? pts : devPts; in generate_lines_and_quads() 249 SkPoint* pts = quads->push_back_n(3); in generate_lines_and_quads() 259 SkPoint::Offset(pts, 4, translate); in generate_lines_and_quads() [all …]
|