/external/skia/src/pathops/ |
D | SkPathOpsPoint.h | 14 return AlmostEqualUlps(pt1.fX, pt2.fX) && AlmostEqualUlps(pt1.fY, pt2.fY); in AlmostEqualUlps() 19 double fY; member 23 fY = pt.fY; in set() 29 fY += v.fY; 35 fY -= v.fY; 41 fY /= s; 47 fY *= s; 51 SkVector v = {SkDoubleToScalar(fX), SkDoubleToScalar(fY)}; in asSkVector() 57 return fX * a.fY - fY * a.fX; in cross() 63 double xy = fX * a.fY; in crossCheck() [all …]
|
D | SkPathOpsLine.cpp | 17 SkDPoint result = { one_t * fPts[0].fX + t * fPts[1].fX, one_t * fPts[0].fY + t * fPts[1].fY }; in ptAtT() 33 || !AlmostBetweenUlps(fPts[0].fY, xy.fY, fPts[1].fY)) { in nearPoint() 38 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearPoint() 40 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearPoint() 51 double tiniest = SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() 52 double largest = SkTMax(SkTMax(SkTMax(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() 68 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearRay() 70 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearRay() 75 double tiniest = SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearRay() 76 double largest = SkTMax(SkTMax(SkTMax(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearRay() [all …]
|
D | SkLineParameters.h | 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() 72 fA = pts[s].fY - pts[e].fY; in cubicEndPoints() 74 fC = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; in cubicEndPoints() 86 fA = pts[0].fY - pts[1].fY; in lineEndPoints() 88 fC = pts[0].fX * pts[1].fY - pts[1].fX * pts[0].fY; in lineEndPoints() 104 if (pts[0].fY > pts[2].fY) { in quadEndPoints() 111 fA = pts[s].fY - pts[e].fY; in quadEndPoints() 113 fC = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; in quadEndPoints() [all …]
|
D | SkOpCubicHull.cpp | 10 double dy = cubic[index].fY - cubic[zero].fY; in rotate() 18 rotPath[index].fY = cubic[zero].fY; in rotate() 22 if (approximately_equal(cubic[side1].fY, cubic[zero].fY)) { in rotate() 23 rotPath[side1].fY = cubic[zero].fY; in rotate() 25 if (approximately_equal(cubic[side2].fY, cubic[zero].fY)) { in rotate() 26 rotPath[side2].fY = cubic[zero].fY; in rotate() 32 rotPath[index].fX = cubic[index].fX * dx + cubic[index].fY * dy; in rotate() 33 rotPath[index].fY = cubic[index].fY * dx - cubic[index].fX * dy; in rotate() 60 if (fPts[yMin].fY > fPts[index].fY || (fPts[yMin].fY == fPts[index].fY in convexHull() 85 int sides = side(rotPath[side1].fY - rotPath[yMin].fY); in convexHull() [all …]
|
D | SkPathOpsCubic.cpp | 23 if (fPts[endIndex].fY == fPts[ctrlIndex].fY) { in align() 24 dstPt->fY = fPts[endIndex].fY; in align() 42 && approximately_equal_half(lessPt.fY, cubicAtT.fY)) { in binarySearch() 61 && approximately_equal_half(morePt.fY, cubicAtT.fY)) { in binarySearch() 108 dst.pts[1].fY = (fPts[0].fY + fPts[1].fY) / 2; in chopAt() 110 dst.pts[2].fY = (fPts[0].fY + 2 * fPts[1].fY + fPts[2].fY) / 4; in chopAt() 112 dst.pts[3].fY = (fPts[0].fY + 3 * (fPts[1].fY + fPts[2].fY) + fPts[3].fY) / 8; in chopAt() 114 dst.pts[4].fY = (fPts[1].fY + 2 * fPts[2].fY + fPts[3].fY) / 4; in chopAt() 116 dst.pts[5].fY = (fPts[2].fY + fPts[3].fY) / 2; in chopAt() 121 interp_cubic_coords(&fPts[0].fY, &dst.pts[0].fY, t); in chopAt() [all …]
|
D | SkPathOpsQuad.cpp | 49 double origY = endPt[0]->fY; in hullIntersects() 51 double opp = endPt[1]->fY - origY; in hullIntersects() 52 double sign = (fPts[oddMan].fY - origY) * adj - (fPts[oddMan].fX - origX) * opp; in hullIntersects() 59 double test = (q2[n].fY - origY) * adj - (q2[n].fX - origX) * opp; in hullIntersects() 181 double tiniest = SkTMin(SkTMin(SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), in isLinear() 182 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear() 183 double largest = SkTMax(SkTMax(SkTMax(SkTMax(SkTMax(fPts[0].fX, fPts[0].fY), in isLinear() 184 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear() 194 a * fPts[0].fY + b * fPts[1].fY + c * fPts[2].fY }; in dxdyAtT() 195 if (result.fX == 0 && result.fY == 0) { in dxdyAtT() [all …]
|
D | SkPathOpsBounds.h | 38 if (pt.fY < fTop) fTop = pt.fY; in add() 40 if (pt.fY > fBottom) fBottom = pt.fY; in add() 45 if (pt.fY < fTop) fTop = SkDoubleToScalar(pt.fY); in add() 47 if (pt.fY > fBottom) fBottom = SkDoubleToScalar(pt.fY); in add() 53 && AlmostLessOrEqualUlps(fTop, pt.fY) in almostContains() 54 && AlmostLessOrEqualUlps(pt.fY, fBottom); in almostContains() 58 return fLeft <= pt.fX && fTop <= pt.fY && in contains() 59 fRight >= pt.fX && fBottom >= pt.fY; in contains()
|
D | SkDLineIntersection.cpp | 49 double denom = bLen.fY * aLen.fX - aLen.fY * bLen.fX; in intersectRay() 51 double numerA = ab0.fY * bLen.fX - bLen.fY * ab0.fX; in intersectRay() 52 double numerB = ab0.fY * aLen.fX - aLen.fY * ab0.fX; in intersectRay() 66 if (!AlmostEqualUlps(aLen.fX * a[0].fY - aLen.fY * a[0].fX, in intersectRay() 67 aLen.fX * b[0].fY - aLen.fY * b[0].fX)) { in intersectRay() 98 double ayLen = a[1].fY - a[0].fY; in intersect() 100 double byLen = b[1].fY - b[0].fY; in intersect() 114 double ab0y = a[0].fY - b[0].fY; in intersect() 182 double min = line[0].fY; in horizontal_coincident() 183 double max = line[1].fY; in horizontal_coincident() [all …]
|
D | SkReduceOrder.cpp | 64 if (quad[minY].fY > quad[index].fY) { in reduce() 70 if (quad[maxY].fY < quad[index].fY) { in reduce() 78 if (AlmostEqualUlps(quad[index].fY, quad[minY].fY)) { in reduce() 135 double dy10 = cubic[1].fY - cubic[0].fY; in check_quadratic() 136 double dy23 = cubic[2].fY - cubic[3].fY; in check_quadratic() 137 double midY = cubic[0].fY + dy10 * 3 / 2; in check_quadratic() 138 double sideAy = midY - cubic[3].fY; in check_quadratic() 146 reduction[1].fY = midY; in check_quadratic() 197 if (cubic[minY].fY > cubic[index].fY) { in reduce() 203 if (cubic[maxY].fY < cubic[index].fY) { in reduce() [all …]
|
/external/skia/include/core/ |
D | SkPoint.h | 19 int16_t fX, fY; member 28 int16_t y() const { return fY; } in y() 32 fY = SkToS16(y); in set() 41 int32_t fX, fY; member 50 int32_t y() const { return fY; } in y() 52 void setY(int32_t y) { fY = y; } in setY() 57 bool isZero() const { return (fX | fY) == 0; } in isZero() 62 void setZero() { fX = fY = 0; } in setZero() 65 void set(int32_t x, int32_t y) { fX = x; fY = y; } in set() 89 void negate() { fX = -fX; fY = -fY; } in negate() [all …]
|
D | SkPoint3.h | 14 SkScalar fX, fY, fZ; member 23 SkScalar y() const { return fY; } in y() 26 void set(SkScalar x, SkScalar y, SkScalar z) { fX = x; fY = y; fZ = z; } in set() 29 return a.fX == b.fX && a.fY == b.fY && a.fZ == b.fZ; 42 SkScalar length() const { return SkPoint3::Length(fX, fY, fZ); } in length() 54 p.set(scale * fX, scale * fY, scale * fZ); in makeScale() 62 fY *= value; in scale() 72 neg.fY = -fY; 82 v.set(a.fX - b.fX, a.fY - b.fY, a.fZ - b.fZ); 90 v.set(a.fX + b.fX, a.fY + b.fY, a.fZ + b.fZ); [all …]
|
/external/skia/src/core/ |
D | SkStrokerPriv.cpp | 14 path->lineTo(stop.fX, stop.fY); in ButtCapper() 34 path->setLastPt(pivot.fX + normal.fX + parallel.fX, pivot.fY + normal.fY + parallel.fY); in SquareCapper() 35 path->lineTo(pivot.fX - normal.fX + parallel.fX, pivot.fY - normal.fY + parallel.fY); in SquareCapper() 37 path->lineTo(pivot.fX + normal.fX + parallel.fX, pivot.fY + normal.fY + parallel.fY); in SquareCapper() 38 path->lineTo(pivot.fX - normal.fX + parallel.fX, pivot.fY - normal.fY + parallel.fY); in SquareCapper() 39 path->lineTo(stop.fX, stop.fY); in SquareCapper() 46 return before.fX * after.fY > before.fY * after.fX; in is_clockwise() 75 inner->lineTo(pivot.fX, pivot.fY); in HandleInnerJoin() 78 inner->lineTo(pivot.fX - after.fX, pivot.fY - after.fY); in HandleInnerJoin() 92 outer->lineTo(pivot.fX + after.fX, pivot.fY + after.fY); in BluntJoiner() [all …]
|
D | SkRRect.cpp | 144 if (fRadii[i].fX <= 0 || fRadii[i].fY <= 0) { in setRectRadii() 150 fRadii[i].fY = 0; in setRectRadii() 182 scale = compute_min_scale(fRadii[1].fY, fRadii[2].fY, height, scale); in scaleRadii() 184 scale = compute_min_scale(fRadii[3].fY, fRadii[0].fY, height, scale); in scaleRadii() 188 SkScaleToSides::AdjustRadii(height, scale, &fRadii[1].fY, &fRadii[2].fY); in scaleRadii() 190 SkScaleToSides::AdjustRadii(height, scale, &fRadii[3].fY, &fRadii[0].fY); in scaleRadii() 210 y < fRect.fTop + fRadii[kUpperLeft_Corner].fY) { in checkCornerContainment() 214 y - (fRect.fTop + fRadii[kUpperLeft_Corner].fY)); in checkCornerContainment() 215 SkASSERT(canonicalPt.fX < 0 && canonicalPt.fY < 0); in checkCornerContainment() 217 y > fRect.fBottom - fRadii[kLowerLeft_Corner].fY) { in checkCornerContainment() [all …]
|
D | SkEdgeClipper.cpp | 35 if (src[0].fY > src[count - 1].fY) { in sort_increasing_Y() 85 return chopMonoQuadAt(pts[0].fY, pts[1].fY, pts[2].fY, y, t); in chopMonoQuadAtY() 98 if (pts[0].fY < clip.fTop) { in chop_quad_in_Y() 103 tmp[2].fY = clip.fTop; in chop_quad_in_Y() 104 clamp_ge(tmp[3].fY, clip.fTop); in chop_quad_in_Y() 112 if (pts[i].fY < clip.fTop) { in chop_quad_in_Y() 113 pts[i].fY = clip.fTop; in chop_quad_in_Y() 120 if (pts[2].fY > clip.fBottom) { in chop_quad_in_Y() 124 clamp_le(tmp[1].fY, clip.fBottom); in chop_quad_in_Y() 125 tmp[2].fY = clip.fBottom; in chop_quad_in_Y() [all …]
|
D | SkLineClipper.cpp | 27 SkScalar dy = src[1].fY - src[0].fY; in sect_with_horizontal() 34 double Y0 = src[0].fY; in sect_with_horizontal() 36 double Y1 = src[1].fY; in sect_with_horizontal() 50 return SkScalarAve(src[0].fY, src[1].fY); in sect_with_vertical() 55 double Y0 = src[0].fY; in sect_with_vertical() 57 double Y1 = src[1].fY; in sect_with_vertical() 99 if (src[0].fY < src[1].fY) { in IntersectLine() 111 if (tmp[index0].fY < clip.fTop) { in IntersectLine() 114 if (tmp[index1].fY > clip.fBottom) { in IntersectLine() 164 if (pts[0].fY < pts[1].fY) { in ClipLine() [all …]
|
D | SkQuadClipper.cpp | 42 return chopMonoQuadAt(pts[0].fY, pts[1].fY, pts[2].fY, y, t); in chopMonoQuadAtY() 55 if (srcPts[0].fY > srcPts[2].fY) { in clipQuad() 68 if (dst[2].fY <= ctop || dst[0].fY >= cbot) { in clipQuad() 76 if (dst[0].fY < ctop) { in clipQuad() 86 if (dst[i].fY < ctop) { in clipQuad() 87 dst[i].fY = ctop; in clipQuad() 94 if (dst[2].fY > cbot) { in clipQuad() 103 if (dst[i].fY > cbot) { in clipQuad() 104 dst[i].fY = cbot; in clipQuad()
|
D | SkAnalyticEdge.h | 31 SkFixed fY; // The current y member 56 if (y == fY + SK_Fixed1) { in goY() 58 fY = y; in goY() 59 } else if (y != fY) { in goY() 63 fY = y; in goY() 69 SkASSERT(fDX == 0 || y - fY == SK_Fixed1 >> yShift); in goY() 70 fY = y; in goY() 86 fUpperY, fLowerY, SkFixedToFloat(fY), SkFixedToFloat(fX), in dump() 112 SkASSERT(SkAbs32(fX - SkFixedMul(fY - fSnappedY, fDX) - fSnappedX) < SK_Fixed1); in keepContinuous() 113 SkASSERT(SkAbs32(fY - fSnappedY) < SK_Fixed1); // This may differ due to smooth jump in keepContinuous() [all …]
|
/external/skia/tests/ |
D | PathOpsLineIntersectionTest.cpp | 120 if (line1[0].fY == line1[1].fY) { in testOne() 124 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left); in testOne() 127 if (line2[0].fY == line2[1].fY) { in testOne() 131 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left); in testOne() 135 double top = SkTMin(line1[0].fY, line1[1].fY); in testOne() 136 double bottom = SkTMax(line1[0].fY, line1[1].fY); in testOne() 138 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top); in testOne() 142 double top = SkTMin(line2[0].fY, line2[1].fY); in testOne() 143 double bottom = SkTMax(line2[0].fY, line2[1].fY); in testOne() 145 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top); in testOne() [all …]
|
D | StrokerTest.cpp | 41 path.moveTo(c[0].fX, c[0].fY); in cubicTest() 42 path.cubicTo(c[1].fX, c[1].fY, c[2].fX, c[2].fY, c[3].fX, c[3].fY); in cubicTest() 48 path.moveTo(c[0].fX, c[0].fY); in quadTest() 49 path.quadTo(c[1].fX, c[1].fY, c[2].fX, c[2].fY); in quadTest() 59 SkPoint c[4] = { {(float) d[0].fX, (float) d[0].fY}, {(float) d[1].fX, (float) d[1].fY}, in cubicSetTest() 60 {(float) d[2].fX, (float) d[2].fY}, {(float) d[3].fX, (float) d[3].fY} }; in cubicSetTest() 75 SkPoint c[4] = { {(float) d[0].fX, (float) d[0].fY}, {(float) d[1].fX, (float) d[1].fY}, in cubicPairSetTest() 76 … {(float) d[2].fX, (float) d[2].fY}, {(float) d[3].fX, (float) d[3].fY} }; in cubicPairSetTest() 91 SkPoint c[3] = { {(float) d[0].fX, (float) d[0].fY}, {(float) d[1].fX, (float) d[1].fY}, in quadSetTest() 92 {(float) d[2].fX, (float) d[2].fY} }; in quadSetTest() [all …]
|
D | PathOpsTestCommon.cpp | 29 double dy = c[3].fY - 3 * (c[2].fY - c[1].fY) - c[0].fY; in calc_t_div() 153 if (quad[1].fY < bounds.fTop) { in CubicToQuads() 154 quad[1].fY = bounds.fTop; in CubicToQuads() 155 } else if (quad[1].fY > bounds.fBottom) { in CubicToQuads() 156 quad[1].fY = bounds.fBottom; in CubicToQuads() 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() 190 quadPath->quadTo(qPts[0].fX, qPts[0].fY, qPts[1].fX, qPts[1].fY); in CubicPathToQuads() 212 simplePath->moveTo(pts[0].fX, pts[0].fY); in CubicPathToSimple() [all …]
|
D | PathOpsCubicReduceOrderTest.cpp | 19 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY) 20 && between(cubic[0].fY, cubic[2].fY, cubic[3].fY); 30 if (cubic[minY].fY > cubic[index].fY) { 36 if (cubic[maxY].fY < cubic[index].fY) { 41 && approximately_equal(cubic[maxY].fY, cubic[minY].fY); 237 || (reducer.fLine[0].fY != cubic[0].fY && reducer.fLine[0].fY != cubic[3].fY) in DEF_TEST() 239 || (reducer.fLine[1].fY != cubic[0].fY && reducer.fLine[1].fY != cubic[3].fY)) { in DEF_TEST() 250 || (!AlmostEqualUlps(reducer.fLine[0].fY, bounds.fTop) in DEF_TEST() 251 && !AlmostEqualUlps(reducer.fLine[0].fY, bounds.fBottom)) in DEF_TEST() 254 || (!AlmostEqualUlps(reducer.fLine[1].fY, bounds.fTop) in DEF_TEST() [all …]
|
/external/skia/gm/ |
D | gradients_2pt_conical.cpp | 46 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutside() 47 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutside() 57 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutsideFlip() 58 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutsideFlip() 67 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInside() 69 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalInside() 80 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInsideFlip() 82 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalInsideFlip() 93 SkScalarAve(pts[0].fY, pts[1].fY)); in Make2ConicalInsideCenter() 95 SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); in Make2ConicalInsideCenter() [all …]
|
D | animatedimageblurs.cpp | 54 fNodes[i].pos().fY - fNodes[i].size()-0.5f, in onDraw() 56 fNodes[i].pos().fY + fNodes[i].size()+0.5f); in onDraw() 89 fPos.fY = rand->nextRangeF(fSize, kHeight - fSize); in init() 91 fDir.fY = SkScalarSqrt(1.0f - fDir.fX * fDir.fX); in init() 93 fDir.fY = -fDir.fY; in init() 105 fPos.fY += deltaTime * fSpeed * fDir.fY; in update() 110 if (fPos.fY >= kHeight || fPos.fY < 0.0f) { in update() 111 fPos.fY = SkTPin<SkScalar>(fPos.fY, 0.0f, kHeight); in update() 112 fDir.fY = -fDir.fY; in update()
|
/external/pdfium/xfa/fwl/theme/ |
D | cfwl_scrollbartp.cpp | 133 FX_FLOAT fY = pRect->top + pRect->height / 2; in DrawPaw() local 134 path.MoveTo(CFX_PointF(fX, fY - 4)); in DrawPaw() 135 path.LineTo(CFX_PointF(fX + fPawLen, fY - 4)); in DrawPaw() 136 path.MoveTo(CFX_PointF(fX, fY - 2)); in DrawPaw() 137 path.LineTo(CFX_PointF(fX + fPawLen, fY - 2)); in DrawPaw() 138 path.MoveTo(CFX_PointF(fX, fY)); in DrawPaw() 139 path.LineTo(CFX_PointF(fX + fPawLen, fY)); in DrawPaw() 140 path.MoveTo(CFX_PointF(fX, fY + 2)); in DrawPaw() 141 path.LineTo(CFX_PointF(fX + fPawLen, fY + 2)); in DrawPaw() 150 path.MoveTo(CFX_PointF(fX, fY - 3)); in DrawPaw() [all …]
|
/external/skia/src/utils/ |
D | SkCamera.cpp | 36 SkScalar mag = SkScalarSqrt(fX*fX + fY*fY + fZ*fZ); in normalize() 40 unit->fY = fY * scale; in normalize() 43 unit->fX = unit->fY = unit->fZ = 0; in normalize() 49 return a.fX * b.fX + a.fY * b.fY + a.fZ * b.fZ; in Dot() 57 SkScalar x = a.fY * b.fZ - a.fZ * b.fY; in Cross() 58 SkScalar y = a.fZ * b.fX - a.fX * b.fY; in Cross() 59 SkScalar z = a.fX * b.fY - a.fY * b.fX; in Cross() 86 SkScalar cx = fU.fY * fV.fZ - fU.fZ * fV.fY; in dotWith() 87 SkScalar cy = fU.fZ * fV.fX - fU.fX * fV.fY; in dotWith() 88 SkScalar cz = fU.fX * fV.fY - fU.fY * fV.fX; in dotWith() [all …]
|