Home
last modified time | relevance | path

Searched refs:SK_ScalarPI (Results 1 – 25 of 130) sorted by relevance

123456

/external/skia/tests/
DTriangulatingPathRendererTests.cpp984 .moveTo(cosf(-SK_ScalarPI/3), sinf(-SK_ScalarPI/3)) in DEF_TEST()
985 .lineTo(cosf(SK_ScalarPI/3), sinf(SK_ScalarPI/3)) in DEF_TEST()
986 .lineTo(cosf(SK_ScalarPI), sinf(SK_ScalarPI)) in DEF_TEST()
988 .lineTo(cosf(2*SK_ScalarPI/3), sinf(2*SK_ScalarPI/3)) in DEF_TEST()
989 .lineTo(cosf(-2*SK_ScalarPI/3), sinf(-2*SK_ScalarPI/3))); in DEF_TEST()
991 .moveTo(cosf(-SK_ScalarPI/3), sinf(-SK_ScalarPI/3)) in DEF_TEST()
992 .lineTo(cosf(SK_ScalarPI/3), sinf(SK_ScalarPI/3)) in DEF_TEST()
993 .lineTo(cosf(SK_ScalarPI), sinf(SK_ScalarPI)) in DEF_TEST()
994 .lineTo(cosf(-SK_ScalarPI/3), sinf(-SK_ScalarPI/3)) in DEF_TEST()
995 .lineTo(cosf(SK_ScalarPI/3), sinf(SK_ScalarPI/3)) in DEF_TEST()
[all …]
DGrPathUtilsTest.cpp44 SkASSERT(rads < SK_ScalarPI + SK_ScalarNearlyZero); in check_cubic_convex_180()
47 if (totalRotation < SK_ScalarPI - SK_ScalarNearlyZero) { in check_cubic_convex_180()
52 if (totalRotation > SK_ScalarPI + SK_ScalarNearlyZero) { in check_cubic_convex_180()
57 SkMeasureNonInflectCubicRotation(chops), SK_ScalarPI)); in check_cubic_convex_180()
59 SkMeasureNonInflectCubicRotation(chops + 3), totalRotation - SK_ScalarPI)); in check_cubic_convex_180()
DGeometryTest.cpp488 (SkScalarNearlyEqual(fullRotation, 2*SK_ScalarPI, kTolerance) || in test_chop_cubic_at_midtangent()
494 REPORTER_ASSERT(reporter, std::abs(leftRotation) - kTolerance <= SK_ScalarPI); in test_chop_cubic_at_midtangent()
495 REPORTER_ASSERT(reporter, std::abs(rightRotation) - kTolerance <= SK_ScalarPI); in test_chop_cubic_at_midtangent()
501 SkScalarNearlyEqual(fullRotation, SK_ScalarPI, kTolerance))) { in test_chop_cubic_at_midtangent()
503 expectedChoppedRotation = (fullRotation - SK_ScalarPI)/2; in test_chop_cubic_at_midtangent()
530 SK_ScalarPI)); in test_measure_rotation()
534 SK_ScalarPI)); in test_measure_rotation()
538 2*SK_ScalarPI)); in test_measure_rotation()
542 SK_ScalarPI)); in test_measure_rotation()
565 checkQuadRotation(kFlatQuad180_1, SK_ScalarPI); in test_measure_rotation()
[all …]
/external/skia/gm/
Dstrokedlines.cpp44 sin = SkScalarSin(angle + (SK_ScalarPI/4)); in draw_fins()
45 cos = SkScalarCos(angle + (SK_ScalarPI/4)); in draw_fins()
55 sin = SkScalarSin(angle - (SK_ScalarPI/4)); in draw_fins()
56 cos = SkScalarCos(angle - (SK_ScalarPI/4)); in draw_fins()
72 for (int i = 0; i < kNumSpokes/2; ++i, angle += SK_ScalarPI/(kNumSpokes/2)) { in draw_snowflake()
90 draw_fins(canvas, negOffset, angle+SK_ScalarPI, paint); in draw_snowflake()
Daddarc.cpp283 SkScalar startAngles[] = { 1.5f * SK_ScalarPI , 1.501f * SK_ScalarPI };
295 startAngles[i] * 180 / SK_ScalarPI, endAngle * 180 / SK_ScalarPI,
300 endAngle * 180 / SK_ScalarPI, startAngles[i] * 180 / SK_ScalarPI,
Dstringart.cpp45 SkScalar angle = kAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); in onDraw()
58 length += angle / SkScalarHalf(SK_ScalarPI); in onDraw()
Dlargeclippedpath.cpp34 float c = 2*SK_ScalarPI*(i - .5f) / kNumPetals; in draw_clipped_flower()
35 float theta = 2*SK_ScalarPI*i / kNumPetals; in draw_clipped_flower()
/external/skia/samplecode/
DSampleStringArt.cpp26 SkScalar angle = fAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); in onDrawContent()
40 length += angle / SkScalarHalf(SK_ScalarPI); in onDrawContent()
DSample3D.cpp87 float fAngle = SK_ScalarPI / 12;
137 { 0, SK_ScalarPI, SK_ColorGREEN }, // back
139 { SK_ScalarPI/2, 0, SK_ColorBLUE }, // top
140 {-SK_ScalarPI/2, 0, SK_ColorCYAN }, // bottom
142 { 0, SK_ScalarPI/2, SK_ColorMAGENTA }, // left
143 { 0,-SK_ScalarPI/2, SK_ColorYELLOW }, // right
DSampleMegaStroke.cpp54 SkScalar x = SkScalarSin(fAngle * SK_ScalarPI / 180) * 200 + 250; in onDrawContent()
55 SkScalar y = SkScalarCos(fAngle * SK_ScalarPI / 180) * 200 + 250; in onDrawContent()
DSamplePathText.cpp344 constexpr static double kAverageAngle = SK_ScalarPI / 8.0;
345 constexpr static double kMaxOffsetAngle = SK_ScalarPI / 3.0;
372 fFrequencies[i] = 2 * SK_ScalarPI / wavelength; in reset()
375 fSpeeds[i] = -sqrt(gravity * 2 * SK_ScalarPI / wavelength); in reset()
376 fOffsets[i] = rand.nextF() * 2 * SK_ScalarPI; in reset()
387 const double sintheta = sin(i * (SK_ScalarPI / kTablePeriod)); in apply()
404 offsets).abs() * (float(kTablePeriod) / float(SK_ScalarPI)); in apply()
/external/skqp/samplecode/
DSampleStringArt.cpp32 SkScalar angle = fAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); in onDrawContent()
46 length += angle / SkScalarHalf(SK_ScalarPI); in onDrawContent()
DSampleLighting.cpp18 const SkVector3 dir = SkVector3::Make(SkScalarSin(angle)*SkScalarSin(SK_ScalarPI*0.25f), in create_lights()
19 SkScalarCos(angle)*SkScalarSin(SK_ScalarPI*0.25f), in create_lights()
20 SkScalarCos(SK_ScalarPI*0.25f)); in create_lights()
DSamplePathText.cpp344 constexpr static double kAverageAngle = SK_ScalarPI / 8.0;
345 constexpr static double kMaxOffsetAngle = SK_ScalarPI / 3.0;
374 fFrequencies[i] = 2 * SK_ScalarPI / wavelength; in reset()
377 fSpeeds[i] = -sqrt(gravity * 2 * SK_ScalarPI / wavelength); in reset()
378 fOffsets[i] = rand.nextF() * 2 * SK_ScalarPI; in reset()
388 const double sintheta = sin(i * (SK_ScalarPI / kTablePeriod)); in apply()
405 offsets).abs() * (float(kTablePeriod) / float(SK_ScalarPI)); in apply()
DSampleLitAtlas.cpp46 SkScalar s = SkScalarSinCos(SK_ScalarPI/6.0f, &c); in rotateLight()
57 SkScalar newRot = SkScalarMod(fShip.rot() + (2*SK_ScalarPI - SK_ScalarPI/32.0f), in left()
58 2 * SK_ScalarPI); in left()
63 SkScalar newRot = SkScalarMod(fShip.rot() + SK_ScalarPI/32.0f, 2 * SK_ScalarPI); in right()
384 fRot = SkScalarMod(fRot, 2 * SK_ScalarPI); in advance()
DSampleMegaStroke.cpp63 SkScalar x = SkScalarSin(fAngle * SK_ScalarPI / 180) * 200 + 250; in onDrawContent()
64 SkScalar y = SkScalarCos(fAngle * SK_ScalarPI / 180) * 200 + 250; in onDrawContent()
/external/skia/docs/examples/
DPoint_set.cpp7 SkPoint pt1, pt2 = { SK_ScalarPI, SK_ScalarSqrt2 }; in draw()
8 pt1.set(SK_ScalarPI, SK_ScalarSqrt2); in draw()
DPath_rCubicTo.cpp13 SkScalar sx = SkScalarSin(i * SK_ScalarPI / 8), in draw()
14 sy = SkScalarCos(i * SK_ScalarPI / 8); in draw()
Dbug767834.cpp1237 SkScalar start = SkDoubleToScalar(wedge.fArc1Angles[0] * 180.f / SK_ScalarPI); in draw()
1238 SkScalar end = SkDoubleToScalar(wedge.fArc1Angles[1] * 180.f / SK_ScalarPI); in draw()
Dbug583299.cpp833 SkScalar start = SkDoubleToScalar(wedge.fArc1Angles[0] * 180.f / SK_ScalarPI); in draw()
834 SkScalar end = SkDoubleToScalar(wedge.fArc1Angles[1] * 180.f / SK_ScalarPI); in draw()
/external/skqp/gm/
Daddarc.cpp275 SkScalar startAngles[] = { 1.5f * SK_ScalarPI , 1.501f * SK_ScalarPI };
287 startAngles[i] * 180 / SK_ScalarPI, endAngle * 180 / SK_ScalarPI,
292 endAngle * 180 / SK_ScalarPI, startAngles[i] * 180 / SK_ScalarPI,
Dstringart.cpp39 SkScalar angle = kAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); in onDraw()
52 length += angle / SkScalarHalf(SK_ScalarPI); in onDraw()
Dstrokedlines.cpp28 sin = SkScalarSinCos(angle + (SK_ScalarPI/4), &cos); in draw_fins()
38 sin = SkScalarSinCos(angle - (SK_ScalarPI/4), &cos); in draw_fins()
54 for (int i = 0; i < kNumSpokes/2; ++i, angle += SK_ScalarPI/(kNumSpokes/2)) { in draw_snowflake()
71 draw_fins(canvas, negOffset, angle+SK_ScalarPI, paint); in draw_snowflake()
/external/skia/bench/
DPolyUtilsBench.cpp122 const SkScalar drad = SK_ScalarPI / n; in makePoly()
147 const SkScalar drad = 2 * SK_ScalarPI / n; in makePoly()
170 SkScalar rad = -SK_ScalarPI / 2; in makePoly()
171 const SkScalar drad = (n >> 1) * SK_ScalarPI * 2 / n; in makePoly()
196 const SkScalar drad = 3 * SK_ScalarPI / (2*n); in makePoly()
221 const SkScalar drad = 3 * SK_ScalarPI / (2*n); in makePoly()
/external/skqp/bench/
DPolyUtilsBench.cpp116 const SkScalar drad = SK_ScalarPI / n; in makePoly()
143 const SkScalar drad = 2 * SK_ScalarPI / n; in makePoly()
167 SkScalar rad = -SK_ScalarPI / 2; in makePoly()
168 const SkScalar drad = (n >> 1) * SK_ScalarPI * 2 / n; in makePoly()
194 const SkScalar drad = 3 * SK_ScalarPI / (2*n); in makePoly()
220 const SkScalar drad = 3 * SK_ScalarPI / (2*n); in makePoly()

123456