Home
last modified time | relevance | path

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

123456

/third_party/skia/tests/
DTriangulatingPathRendererTests.cpp987 .moveTo(cosf(-SK_ScalarPI/3), sinf(-SK_ScalarPI/3)) in DEF_TEST()
988 .lineTo(cosf(SK_ScalarPI/3), sinf(SK_ScalarPI/3)) in DEF_TEST()
989 .lineTo(cosf(SK_ScalarPI), sinf(SK_ScalarPI)) in DEF_TEST()
991 .lineTo(cosf(2*SK_ScalarPI/3), sinf(2*SK_ScalarPI/3)) in DEF_TEST()
992 .lineTo(cosf(-2*SK_ScalarPI/3), sinf(-2*SK_ScalarPI/3))); in DEF_TEST()
994 .moveTo(cosf(-SK_ScalarPI/3), sinf(-SK_ScalarPI/3)) in DEF_TEST()
995 .lineTo(cosf(SK_ScalarPI/3), sinf(SK_ScalarPI/3)) in DEF_TEST()
996 .lineTo(cosf(SK_ScalarPI), sinf(SK_ScalarPI)) in DEF_TEST()
997 .lineTo(cosf(-SK_ScalarPI/3), sinf(-SK_ScalarPI/3)) in DEF_TEST()
998 .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.cpp490 (SkScalarNearlyEqual(fullRotation, 2*SK_ScalarPI, kTolerance) || in test_chop_cubic_at_midtangent()
496 REPORTER_ASSERT(reporter, std::abs(leftRotation) - kTolerance <= SK_ScalarPI); in test_chop_cubic_at_midtangent()
497 REPORTER_ASSERT(reporter, std::abs(rightRotation) - kTolerance <= SK_ScalarPI); in test_chop_cubic_at_midtangent()
503 SkScalarNearlyEqual(fullRotation, SK_ScalarPI, kTolerance))) { in test_chop_cubic_at_midtangent()
505 expectedChoppedRotation = (fullRotation - SK_ScalarPI)/2; in test_chop_cubic_at_midtangent()
532 SK_ScalarPI)); in test_measure_rotation()
536 SK_ScalarPI)); in test_measure_rotation()
540 2*SK_ScalarPI)); in test_measure_rotation()
544 SK_ScalarPI)); in test_measure_rotation()
567 checkQuadRotation(kFlatQuad180_1, SK_ScalarPI); in test_measure_rotation()
[all …]
/third_party/flutter/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.cpp285 SkScalar startAngles[] = { 1.5f * SK_ScalarPI , 1.501f * SK_ScalarPI };
297 startAngles[i] * 180 / SK_ScalarPI, endAngle * 180 / SK_ScalarPI,
302 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()
/third_party/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()
/third_party/flutter/skia/samplecode/
DSampleStringArt.cpp26 SkScalar angle = fAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); in onDrawContent()
40 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.cpp340 constexpr static double kAverageAngle = SK_ScalarPI / 8.0;
341 constexpr static double kMaxOffsetAngle = SK_ScalarPI / 3.0;
370 fFrequencies[i] = 2 * SK_ScalarPI / wavelength; in reset()
373 fSpeeds[i] = -sqrt(gravity * 2 * SK_ScalarPI / wavelength); in reset()
374 fOffsets[i] = rand.nextF() * 2 * SK_ScalarPI; in reset()
384 const double sintheta = sin(i * (SK_ScalarPI / kTablePeriod)); in apply()
401 offsets).abs() * (float(kTablePeriod) / float(SK_ScalarPI)); in apply()
DSampleLitAtlas.cpp44 SkScalar r = SK_ScalarPI / 6.0f, 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()
378 fRot = SkScalarMod(fRot, 2 * SK_ScalarPI); in advance()
/third_party/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
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()
/third_party/flutter/skia/bench/
DPolyUtilsBench.cpp121 const SkScalar drad = SK_ScalarPI / n; in makePoly()
146 const SkScalar drad = 2 * SK_ScalarPI / n; in makePoly()
169 SkScalar rad = -SK_ScalarPI / 2; in makePoly()
170 const SkScalar drad = (n >> 1) * SK_ScalarPI * 2 / n; in makePoly()
195 const SkScalar drad = 3 * SK_ScalarPI / (2*n); in makePoly()
220 const SkScalar drad = 3 * SK_ScalarPI / (2*n); in makePoly()
/third_party/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()
/third_party/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()
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()
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()
/third_party/flutter/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()
/third_party/skia/include/core/
DSkScalar.h21 #define SK_ScalarPI SK_FloatPI macro
112 #define SkDegreesToRadians(degrees) ((degrees) * (SK_ScalarPI / 180))
113 #define SkRadiansToDegrees(radians) ((radians) * (180 / SK_ScalarPI))

123456