/third_party/skia/tests/ |
D | PathOpsCubicReduceOrderTest.cpp | 18 static bool controls_inside(const SkDCubic& cubic) { 19 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX) 20 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX) 21 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY) 22 && between(cubic[0].fY, cubic[2].fY, cubic[3].fY); 25 static bool tiny(const SkDCubic& cubic) { 29 if (cubic[minX].fX > cubic[index].fX) { 32 if (cubic[minY].fY > cubic[index].fY) { 35 if (cubic[maxX].fX < cubic[index].fX) { 38 if (cubic[maxY].fY < cubic[index].fY) { [all …]
|
D | PathOpsCubicLineIntersectionTest.cpp | 17 CubicPts cubic; member 30 const CubicPts& cuPts = failLineCubicTests[iIndex].cubic; in testFail() 31 SkDCubic cubic; in testFail() local 32 cubic.debugSet(cuPts.fPts); in testFail() 33 SkASSERT(ValidCubic(cubic)); in testFail() 38 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics); in testFail() 50 int roots = i.intersect(cubic, line); in testFail() 103 static int doIntersect(SkIntersections& intersections, const SkDCubic& cubic, const SkDLine& line) { in doIntersect() argument 114 result = intersections.vertical(cubic, top, bottom, line[0].fX, flipped); in doIntersect() 123 result = intersections.horizontal(cubic, left, right, line[0].fY, flipped); in doIntersect() [all …]
|
D | PathOpsTestCommon.cpp | 20 static double calc_t_div(const SkDCubic& cubic, double precision, double start) { in calc_t_div() argument 25 cPtr = &cubic; in calc_t_div() 28 sub = cubic.subDivide(start, 1); in calc_t_div() 43 static bool add_simple_ts(const SkDCubic& cubic, double precision, SkTArray<double, true>* ts) { in add_simple_ts() argument 44 double tDiv = calc_t_div(cubic, precision, 0); in add_simple_ts() 55 static void addTs(const SkDCubic& cubic, double precision, double start, double end, in addTs() argument 57 double tDiv = calc_t_div(cubic, precision, 0); in addTs() 67 static void toQuadraticTs(const SkDCubic* cubic, double precision, SkTArray<double, true>* ts) { in toQuadraticTs() argument 69 int order = reducer.reduce(*cubic, SkReduceOrder::kAllow_Quadratics); in toQuadraticTs() 74 int inflections = cubic->findInflections(inflectT); in toQuadraticTs() [all …]
|
D | GrPathUtilsTest.cpp | 124 SkPoint cubic[4]; in DEF_TEST() local 125 skgpu::VertexWriter cubicWriter(cubic); in DEF_TEST() 127 REPORTER_ASSERT(r, cubic[0] == SkPoint::Make(0,0)); in DEF_TEST() 128 REPORTER_ASSERT(r, SkScalarNearlyEqual(cubic[1].fX, 1)); in DEF_TEST() 129 REPORTER_ASSERT(r, SkScalarNearlyEqual(cubic[1].fY, 2)); in DEF_TEST() 130 REPORTER_ASSERT(r, SkScalarNearlyEqual(cubic[2].fX, 2)); in DEF_TEST() 131 REPORTER_ASSERT(r, SkScalarNearlyEqual(cubic[2].fY, 4)); in DEF_TEST() 132 REPORTER_ASSERT(r, cubic[3] == SkPoint::Make(3,6)); in DEF_TEST() 135 GrPathUtils::convertQuadToCubic(quad, cubic); in DEF_TEST() 136 REPORTER_ASSERT(r, cubic[0] == SkPoint::Make(0,0)); in DEF_TEST() [all …]
|
D | PathOpsDRectTest.cpp | 37 static void setRawBounds(const SkDCubic& cubic, SkDRect* rect) { in setRawBounds() argument 38 rect->set(cubic[0]); in setRawBounds() 39 rect->add(cubic[1]); in setRawBounds() 40 rect->add(cubic[2]); in setRawBounds() 41 rect->add(cubic[3]); in setRawBounds() 63 SkDCubic cubic; in DEF_TEST() local 64 cubic.debugSet(c.fPts); in DEF_TEST() 65 SkASSERT(ValidCubic(cubic)); in DEF_TEST() 66 setRawBounds(cubic, &rect); in DEF_TEST() 67 rect2.setBounds(cubic); in DEF_TEST()
|
D | PathOpsLineParametetersTest.cpp | 44 SkDCubic cubic; in DEF_TEST() local 45 cubic.debugSet(c.fPts); in DEF_TEST() 46 SkASSERT(ValidCubic(cubic)); in DEF_TEST() 47 lineParameters.cubicEndPoints(cubic, 0, 3); in DEF_TEST() 49 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1); in DEF_TEST() 50 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2); in DEF_TEST() 69 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1); in DEF_TEST() 70 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2); in DEF_TEST()
|
D | PathOpsCubicLineIntersectionIdeas.cpp | 54 static double binary_search(const SkDCubic& cubic, double step, const SkDPoint& pt, double t, in binary_search() argument 59 SkDPoint cubicAtT = cubic.ptAtT(t); in binary_search() 68 cubic.dump(); in binary_search() 76 SkDPoint lessPt = cubic.ptAtT(t - lastStep); in binary_search() 85 SkDPoint morePt = cubic.ptAtT(t + lastStep); in binary_search() 155 SkDCubic cubic; in DEF_TEST() local 156 cubic.debugSet(cuPts.fPts); in DEF_TEST() 157 SkDPoint pt = cubic.ptAtT(t); in DEF_TEST() 161 SkDCubic::Coefficients(&cubic[0].fY, &A, &B, &C, &D); in DEF_TEST() 173 SkDPoint calcPt = cubic.ptAtT(t); in DEF_TEST() [all …]
|
D | StrokerTest.cpp | 290 SkPoint cubic[4]; in DEF_TEST() local 291 cubic[0].fX = r.nextRangeF(0, 500); in DEF_TEST() 292 cubic[0].fY = r.nextRangeF(0, 500); in DEF_TEST() 295 cubic[1].fX = r.nextRangeF(0, 500); in DEF_TEST() 296 cubic[1].fY = r.nextRangeF(0, 500); in DEF_TEST() 297 } while (SkPointPriv::DistanceToSqd(cubic[0], cubic[1]) < halfSquared); in DEF_TEST() 299 cubic[2].fX = r.nextRangeF(0, 500); in DEF_TEST() 300 cubic[2].fY = r.nextRangeF(0, 500); in DEF_TEST() 301 } while ( SkPointPriv::DistanceToSqd(cubic[0], cubic[2]) < halfSquared in DEF_TEST() 302 || SkPointPriv::DistanceToSqd(cubic[1], cubic[2]) < halfSquared); in DEF_TEST() [all …]
|
/third_party/flutter/skia/tests/ |
D | PathOpsCubicReduceOrderTest.cpp | 16 static bool controls_inside(const SkDCubic& cubic) { 17 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX) 18 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX) 19 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY) 20 && between(cubic[0].fY, cubic[2].fY, cubic[3].fY); 23 static bool tiny(const SkDCubic& cubic) { 27 if (cubic[minX].fX > cubic[index].fX) { 30 if (cubic[minY].fY > cubic[index].fY) { 33 if (cubic[maxX].fX < cubic[index].fX) { 36 if (cubic[maxY].fY < cubic[index].fY) { [all …]
|
D | PathOpsCubicLineIntersectionTest.cpp | 17 CubicPts cubic; member 30 const CubicPts& cuPts = failLineCubicTests[iIndex].cubic; in testFail() 31 SkDCubic cubic; in testFail() local 32 cubic.debugSet(cuPts.fPts); in testFail() 33 SkASSERT(ValidCubic(cubic)); in testFail() 38 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics); in testFail() 50 int roots = i.intersect(cubic, line); in testFail() 103 static int doIntersect(SkIntersections& intersections, const SkDCubic& cubic, const SkDLine& line) { in doIntersect() argument 114 result = intersections.vertical(cubic, top, bottom, line[0].fX, flipped); in doIntersect() 123 result = intersections.horizontal(cubic, left, right, line[0].fY, flipped); in doIntersect() [all …]
|
D | PathOpsTestCommon.cpp | 19 static double calc_t_div(const SkDCubic& cubic, double precision, double start) { in calc_t_div() argument 24 cPtr = &cubic; in calc_t_div() 27 sub = cubic.subDivide(start, 1); in calc_t_div() 42 static bool add_simple_ts(const SkDCubic& cubic, double precision, SkTArray<double, true>* ts) { in add_simple_ts() argument 43 double tDiv = calc_t_div(cubic, precision, 0); in add_simple_ts() 54 static void addTs(const SkDCubic& cubic, double precision, double start, double end, in addTs() argument 56 double tDiv = calc_t_div(cubic, precision, 0); in addTs() 66 static void toQuadraticTs(const SkDCubic* cubic, double precision, SkTArray<double, true>* ts) { in toQuadraticTs() argument 68 int order = reducer.reduce(*cubic, SkReduceOrder::kAllow_Quadratics); in toQuadraticTs() 73 int inflections = cubic->findInflections(inflectT); in toQuadraticTs() [all …]
|
D | PathOpsDRectTest.cpp | 37 static void setRawBounds(const SkDCubic& cubic, SkDRect* rect) { in setRawBounds() argument 38 rect->set(cubic[0]); in setRawBounds() 39 rect->add(cubic[1]); in setRawBounds() 40 rect->add(cubic[2]); in setRawBounds() 41 rect->add(cubic[3]); in setRawBounds() 63 SkDCubic cubic; in DEF_TEST() local 64 cubic.debugSet(c.fPts); in DEF_TEST() 65 SkASSERT(ValidCubic(cubic)); in DEF_TEST() 66 setRawBounds(cubic, &rect); in DEF_TEST() 67 rect2.setBounds(cubic); in DEF_TEST()
|
D | PathOpsLineParametetersTest.cpp | 44 SkDCubic cubic; in DEF_TEST() local 45 cubic.debugSet(c.fPts); in DEF_TEST() 46 SkASSERT(ValidCubic(cubic)); in DEF_TEST() 47 lineParameters.cubicEndPoints(cubic, 0, 3); in DEF_TEST() 49 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1); in DEF_TEST() 50 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2); in DEF_TEST() 69 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1); in DEF_TEST() 70 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2); in DEF_TEST()
|
D | PathOpsCubicLineIntersectionIdeas.cpp | 54 static double binary_search(const SkDCubic& cubic, double step, const SkDPoint& pt, double t, in binary_search() argument 59 SkDPoint cubicAtT = cubic.ptAtT(t); in binary_search() 68 cubic.dump(); in binary_search() 76 SkDPoint lessPt = cubic.ptAtT(t - lastStep); in binary_search() 85 SkDPoint morePt = cubic.ptAtT(t + lastStep); in binary_search() 155 SkDCubic cubic; in DEF_TEST() local 156 cubic.debugSet(cuPts.fPts); in DEF_TEST() 157 SkDPoint pt = cubic.ptAtT(t); in DEF_TEST() 161 SkDCubic::Coefficients(&cubic[0].fY, &A, &B, &C, &D); in DEF_TEST() 173 SkDPoint calcPt = cubic.ptAtT(t); in DEF_TEST() [all …]
|
D | StrokerTest.cpp | 288 SkPoint cubic[4]; in DEF_TEST() local 289 cubic[0].fX = r.nextRangeF(0, 500); in DEF_TEST() 290 cubic[0].fY = r.nextRangeF(0, 500); in DEF_TEST() 293 cubic[1].fX = r.nextRangeF(0, 500); in DEF_TEST() 294 cubic[1].fY = r.nextRangeF(0, 500); in DEF_TEST() 295 } while (SkPointPriv::DistanceToSqd(cubic[0], cubic[1]) < halfSquared); in DEF_TEST() 297 cubic[2].fX = r.nextRangeF(0, 500); in DEF_TEST() 298 cubic[2].fY = r.nextRangeF(0, 500); in DEF_TEST() 299 } while ( SkPointPriv::DistanceToSqd(cubic[0], cubic[2]) < halfSquared in DEF_TEST() 300 || SkPointPriv::DistanceToSqd(cubic[1], cubic[2]) < halfSquared); in DEF_TEST() [all …]
|
/third_party/flutter/skia/src/pathops/ |
D | SkReduceOrder.cpp | 103 static int coincident_line(const SkDCubic& cubic, SkDCubic& reduction) { in coincident_line() argument 104 reduction[0] = reduction[1] = cubic[0]; in coincident_line() 112 static int vertical_line(const SkDCubic& cubic, SkDCubic& reduction) { in vertical_line() argument 113 reduction[0] = cubic[0]; in vertical_line() 114 reduction[1] = cubic[3]; in vertical_line() 118 static int horizontal_line(const SkDCubic& cubic, SkDCubic& reduction) { in horizontal_line() argument 119 reduction[0] = cubic[0]; in horizontal_line() 120 reduction[1] = cubic[3]; in horizontal_line() 125 static int check_quadratic(const SkDCubic& cubic, SkDCubic& reduction) { in check_quadratic() argument 126 double dx10 = cubic[1].fX - cubic[0].fX; in check_quadratic() [all …]
|
D | SkOpCubicHull.cpp | 9 static bool rotate(const SkDCubic& cubic, int zero, int index, SkDCubic& rotPath) { in rotate() argument 10 double dy = cubic[index].fY - cubic[zero].fY; in rotate() 11 double dx = cubic[index].fX - cubic[zero].fX; in rotate() 16 rotPath = cubic; 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() [all …]
|
/third_party/skia/src/pathops/ |
D | SkReduceOrder.cpp | 103 static int coincident_line(const SkDCubic& cubic, SkDCubic& reduction) { in coincident_line() argument 104 reduction[0] = reduction[1] = cubic[0]; in coincident_line() 112 static int vertical_line(const SkDCubic& cubic, SkDCubic& reduction) { in vertical_line() argument 113 reduction[0] = cubic[0]; in vertical_line() 114 reduction[1] = cubic[3]; in vertical_line() 118 static int horizontal_line(const SkDCubic& cubic, SkDCubic& reduction) { in horizontal_line() argument 119 reduction[0] = cubic[0]; in horizontal_line() 120 reduction[1] = cubic[3]; in horizontal_line() 125 static int check_quadratic(const SkDCubic& cubic, SkDCubic& reduction) { in check_quadratic() argument 126 double dx10 = cubic[1].fX - cubic[0].fX; in check_quadratic() [all …]
|
D | SkOpCubicHull.cpp | 9 static bool rotate(const SkDCubic& cubic, int zero, int index, SkDCubic& rotPath) { in rotate() argument 10 double dy = cubic[index].fY - cubic[zero].fY; in rotate() 11 double dx = cubic[index].fX - cubic[zero].fX; in rotate() 16 rotPath = cubic; 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[i].fX = cubic[i].fX * dx + cubic[i].fY * dy; in rotate() [all …]
|
/third_party/icu/icu4c/source/test/testdata/cldr/units/ |
D | unitPreferencesTest.txt | 62 concentration; blood-glucose; AG; 662435483600000000000000; 6.624354836E23; item-per-cubic-meter; 1… 63 concentration; blood-glucose; AG; 602214076000000000000000; 6.02214076E23; item-per-cubic-meter; 1;… 64 concentration; blood-glucose; AG; 541992668400000000000000; 5.419926684E23; item-per-cubic-meter; 9… 66 …1; 66243548360000000000000000000 / 1801557; 3.67701651182838E22; item-per-cubic-meter; 11 / 10; 1.… 67 …; 60221407600000000000000000000 / 1801557; 3.342742283480345E22; item-per-cubic-meter; 1; 1.0; mil… 68 …01; 6022140760000000000000000000 / 200173; 3.008468055132311E22; item-per-cubic-meter; 9 / 10; 0.9… 70 concentration; default; 001; 11 / 10; 1.1; item-per-cubic-meter; 11 / 10; 1.1; item-per-cubic-meter 71 concentration; default; 001; 1; 1.0; item-per-cubic-meter; 1; 1.0; item-per-cubic-meter 72 concentration; default; 001; 9 / 10; 0.9; item-per-cubic-meter; 9 / 10; 0.9; item-per-cubic-meter 74 consumption; default; 001; 11 / 1000000000; 1.1E-8; cubic-meter-per-meter; 11 / 10; 1.1; liter-per-… [all …]
|
D | unitsTest.txt | 34 concentration ; milligram-ofglucose-per-deciliter ; kilogram-item-per-kilogram-cubic-meter ; 60,221… 35 concentration ; millimole-per-liter ; item-per-cubic-meter ; 602,214,076,000,000,000,000,000 * x ; … 37 consumption ; liter-per-100-kilometer ; cubic-meter-per-meter ; 0.00000001 * x ; 1.0E-5 38 consumption ; liter-per-kilometer ; cubic-meter-per-meter ; 0.000001 * x ; 0.001 39 consumption-inverse ; mile-per-gallon-imperial ; meter-per-cubic-meter ; 160,934,400,000/454,609 * … 40 consumption-inverse ; mile-per-gallon ; meter-per-cubic-meter ; 48,000,000,000/112,903 * x ; 4.2514… 64 electric-resistance ; ohm ; kilogram-square-meter-per-cubic-second-square-ampere ; 1 * x ; 1000.0 75 energy ; kilowatt-hour ; kilogram-square-meter-second-per-cubic-second ; 3,600,000 * x ; 3.6E9 132 power ; milliwatt ; kilogram-square-meter-per-cubic-second ; 0.001 * x ; 1.0 133 power ; watt ; kilogram-square-meter-per-cubic-second ; 1 * x ; 1000.0 [all …]
|
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/data/cldr/units/ |
D | unitPreferencesTest.txt | 62 concentration; blood-glucose; AG; 662435483600000000000000; 6.624354836E23; item-per-cubic-meter; 1… 63 concentration; blood-glucose; AG; 602214076000000000000000; 6.02214076E23; item-per-cubic-meter; 1;… 64 concentration; blood-glucose; AG; 541992668400000000000000; 5.419926684E23; item-per-cubic-meter; 9… 66 …1; 66243548360000000000000000000 / 1801557; 3.67701651182838E22; item-per-cubic-meter; 11 / 10; 1.… 67 …; 60221407600000000000000000000 / 1801557; 3.342742283480345E22; item-per-cubic-meter; 1; 1.0; mil… 68 …01; 6022140760000000000000000000 / 200173; 3.008468055132311E22; item-per-cubic-meter; 9 / 10; 0.9… 70 concentration; default; 001; 11 / 10; 1.1; item-per-cubic-meter; 11 / 10; 1.1; item-per-cubic-meter 71 concentration; default; 001; 1; 1.0; item-per-cubic-meter; 1; 1.0; item-per-cubic-meter 72 concentration; default; 001; 9 / 10; 0.9; item-per-cubic-meter; 9 / 10; 0.9; item-per-cubic-meter 74 consumption; default; 001; 11 / 1000000000; 1.1E-8; cubic-meter-per-meter; 11 / 10; 1.1; liter-per-… [all …]
|
D | unitsTest.txt | 34 concentration ; milligram-ofglucose-per-deciliter ; kilogram-item-per-kilogram-cubic-meter ; 60,221… 35 concentration ; millimole-per-liter ; item-per-cubic-meter ; 602,214,076,000,000,000,000,000 * x ; … 37 consumption ; liter-per-100-kilometer ; cubic-meter-per-meter ; 0.00000001 * x ; 1.0E-5 38 consumption ; liter-per-kilometer ; cubic-meter-per-meter ; 0.000001 * x ; 0.001 39 consumption-inverse ; mile-per-gallon-imperial ; meter-per-cubic-meter ; 160,934,400,000/454,609 * … 40 consumption-inverse ; mile-per-gallon ; meter-per-cubic-meter ; 48,000,000,000/112,903 * x ; 4.2514… 64 electric-resistance ; ohm ; kilogram-square-meter-per-cubic-second-square-ampere ; 1 * x ; 1000.0 75 energy ; kilowatt-hour ; kilogram-square-meter-second-per-cubic-second ; 3,600,000 * x ; 3.6E9 132 power ; milliwatt ; kilogram-square-meter-per-cubic-second ; 0.001 * x ; 1.0 133 power ; watt ; kilogram-square-meter-per-cubic-second ; 1 * x ; 1000.0 [all …]
|
/third_party/flutter/skia/src/utils/win/ |
D | SkDWriteGeometrySink.cpp | 92 static bool check_quadratic(const Cubic& cubic, Quadratic& reduction) { in check_quadratic() argument 93 float dx10 = cubic[1].x - cubic[0].x; in check_quadratic() 94 float dx23 = cubic[2].x - cubic[3].x; in check_quadratic() 95 float midX = cubic[0].x + dx10 * 3 / 2; in check_quadratic() 98 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) { in check_quadratic() 101 float dy10 = cubic[1].y - cubic[0].y; in check_quadratic() 102 float dy23 = cubic[2].y - cubic[3].y; in check_quadratic() 103 float midY = cubic[0].y + dy10 * 3 / 2; in check_quadratic() 104 if (!approximately_equal(midY, (dy23 * 3 / 2) + cubic[3].y)) { in check_quadratic() 107 reduction[0] = cubic[0]; in check_quadratic() [all …]
|
/third_party/skia/src/utils/win/ |
D | SkDWriteGeometrySink.cpp | 97 static bool check_quadratic(const Cubic& cubic, Point& quadraticP1) { in check_quadratic() argument 98 float dx10 = cubic[1].x - cubic[0].x; in check_quadratic() 99 float dx23 = cubic[2].x - cubic[3].x; in check_quadratic() 100 float midX = cubic[0].x + dx10 * 3 / 2; in check_quadratic() 103 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) { in check_quadratic() 106 float dy10 = cubic[1].y - cubic[0].y; in check_quadratic() 107 float dy23 = cubic[2].y - cubic[3].y; in check_quadratic() 108 float midY = cubic[0].y + dy10 * 3 / 2; in check_quadratic() 109 if (!approximately_equal(midY, (dy23 * 3 / 2) + cubic[3].y)) { in check_quadratic() 122 Cubic cubic = { { fCurrent.x, fCurrent.y }, in SK_STDMETHODIMP_() local [all …]
|