/third_party/skia/tests/ |
D | PathMeasureTest.cpp | 52 { SK_Scalar1, SK_Scalar1 }, in test_small_segment() 81 path.lineTo(SK_Scalar1, 0); in DEF_TEST() 82 path.lineTo(SK_Scalar1, SK_Scalar1); in DEF_TEST() 83 path.lineTo(0, SK_Scalar1); in DEF_TEST() 87 SkASSERT(length == SK_Scalar1*4); in DEF_TEST() 91 path.lineTo(SK_Scalar1*3, SK_Scalar1*4); in DEF_TEST() 94 REPORTER_ASSERT(reporter, length == SK_Scalar1*5); in DEF_TEST() 97 path.addCircle(0, 0, SK_Scalar1); in DEF_TEST() 104 path.lineTo(SK_Scalar1, 0); in DEF_TEST() 105 path.lineTo(SK_Scalar1, SK_Scalar1); in DEF_TEST() [all …]
|
D | PathTest.cpp | 249 stroke.setStrokeStyle(2 * SK_Scalar1); in test_path_crbugskia2820() 783 matrix.setTranslate(SK_Scalar1, SK_Scalar1); in test_isfinite_after_transform() 841 if (size < SK_Scalar1) { in test_arb_round_rect_is_convex() 868 if (size < SK_Scalar1) { in test_arb_zero_rad_round_rect_is_rect() 901 { SK_Scalar1, 0 }, in test_rect_isfinite() 902 { 0, SK_Scalar1 }, in test_rect_isfinite() 932 path.moveTo(SK_Scalar1, 0); in test_path_isfinite() 1035 rec.setStrokeStyle(SK_Scalar1, false); in test_strokerec() 1038 rec.setStrokeStyle(SK_Scalar1, true); in test_strokerec() 1137 path.lineTo(110 * SK_Scalar1, -10 * SK_Scalar1); in test_direction() [all …]
|
/third_party/skia/gm/ |
D | roundrects.cpp | 149 canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1); in onDraw() 172 mat.postTranslate(kXStart + SK_Scalar1 * kXStep * (testCount % maxX) + in onDraw() 173 SK_Scalar1 / 4, in onDraw() 174 kYStart + SK_Scalar1 * kYStep * (testCount / maxX) + in onDraw() 175 3 * SK_Scalar1 / 4); in onDraw() 200 canvas->translate(kXStart + SK_Scalar1 * kXStep * 2.55f + SK_Scalar1 / 4, in onDraw() 201 kYStart + SK_Scalar1 * kYStep * i + 3 * SK_Scalar1 / 4); in onDraw() 219 canvas->translate(kXStart + SK_Scalar1 * kXStep * 4 + SK_Scalar1 / 4, in onDraw() 220 kYStart + SK_Scalar1 * kYStep * i + 3 * SK_Scalar1 / 4 + in onDraw() 239 canvas->translate(kXStart + SK_Scalar1 * kXStep * 3.25f + SK_Scalar1 / 4, in onDraw() [all …]
|
D | degeneratesegments.cpp | 43 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMove() 49 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveClose() 61 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLine() 68 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenLineClose() 81 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenQuad() 88 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenQuadClose() 101 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenCubic() 108 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveDegenCubicClose() 121 SkPoint endPt = startPt + SkPoint::Make(40*SK_Scalar1, 0); in AddLine() 127 SkPoint moveToPt = startPt + SkPoint::Make(0, 10*SK_Scalar1); in AddMoveLine() [all …]
|
D | ovals.cpp | 148 canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1); in onDraw() 169 mat.postTranslate(kXStart + SK_Scalar1 * kXStep * (testCount % maxX) + in onDraw() 170 SK_Scalar1 / 4, in onDraw() 171 kYStart + SK_Scalar1 * kYStep * (testCount / maxX) + in onDraw() 172 3 * SK_Scalar1 / 4); in onDraw() 194 canvas->translate(kXStart + SK_Scalar1 * kXStep * 2.55f + SK_Scalar1 / 4, in onDraw() 195 kYStart + SK_Scalar1 * kYStep * i + 3 * SK_Scalar1 / 4); in onDraw() 210 canvas->translate(kXStart + SK_Scalar1 * kXStep * 4 + SK_Scalar1 / 4, in onDraw() 211 kYStart + SK_Scalar1 * kYStep * i + 3 * SK_Scalar1 / 4 + in onDraw() 227 canvas->translate(kXStart + SK_Scalar1 * kXStep * 3.25f + SK_Scalar1 / 4, in onDraw() [all …]
|
D | bigmatrix.cpp | 27 m.setRotate(33 * SK_Scalar1); 28 m.postScale(3000 * SK_Scalar1, 3000 * SK_Scalar1); 29 m.postTranslate(6000 * SK_Scalar1, -5000 * SK_Scalar1); 40 SkPoint pt = {10 * SK_Scalar1, 10 * SK_Scalar1}; 41 SkScalar small = 1 / (500 * SK_Scalar1); 46 pt.set(30 * SK_Scalar1, 10 * SK_Scalar1); 58 pt.set(30 * SK_Scalar1, 30 * SK_Scalar1); 62 s.setScale(SK_Scalar1 / 1000, SK_Scalar1 / 1000);
|
D | quadpaths.cpp | 89 path.fPath.moveTo(25*SK_Scalar1, 10*SK_Scalar1); in onDraw() 90 path.fPath.quadTo(50*SK_Scalar1, 20*SK_Scalar1, in onDraw() 91 75*SK_Scalar1, 10*SK_Scalar1); in onDraw() 103 SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); in onDraw() 105 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); in onDraw() 109 canvas->translate((rect.width() + 40 * SK_Scalar1) * SK_ARRAY_COUNT(gStyles), 0); in onDraw() 114 canvas->translate(0, rect.height() + 40 * SK_Scalar1); in onDraw() 119 canvas->translate(rect.width() + 40 * SK_Scalar1, 0); in onDraw() 125 gFills[fill].fFill, SK_Scalar1*10); in onDraw() 219 path.fPath.moveTo(25*SK_Scalar1, 10*SK_Scalar1); in onDraw() [all …]
|
D | cubicpaths.cpp | 178 path.fPath.moveTo(25*SK_Scalar1, 10*SK_Scalar1); in onDraw() 179 path.fPath.cubicTo(40*SK_Scalar1, 20*SK_Scalar1, in onDraw() 180 60*SK_Scalar1, 20*SK_Scalar1, in onDraw() 181 75*SK_Scalar1, 10*SK_Scalar1); in onDraw() 193 SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); in onDraw() 195 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); in onDraw() 199 canvas->translate((rect.width() + 40 * SK_Scalar1) * SK_ARRAY_COUNT(gStyles), 0); in onDraw() 204 canvas->translate(0, rect.height() + 40 * SK_Scalar1); in onDraw() 209 canvas->translate(rect.width() + 40 * SK_Scalar1, 0); in onDraw() 215 gFills[fill].fFill, SK_Scalar1*10); in onDraw() [all …]
|
D | linepaths.cpp | 73 path.fPath.moveTo(25*SK_Scalar1, 15*SK_Scalar1); in draw() 74 path.fPath.lineTo(75*SK_Scalar1, 15*SK_Scalar1); in draw() 96 SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); in draw() 98 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); in draw() 102 canvas->translate((rect.width() + 40 * SK_Scalar1) * SK_ARRAY_COUNT(gStyles), 0); in draw() 107 canvas->translate(0, rect.height() + 40 * SK_Scalar1); in draw() 112 canvas->translate(rect.width() + 40 * SK_Scalar1, 0); in draw() 118 gFills[fill].fFill, SK_Scalar1*10); in draw()
|
D | aaclip.cpp | 51 SkRect target (SkRect::MakeWH(10 * SK_Scalar1, 10 * SK_Scalar1)); in draw_square() 56 SkRect target (SkRect::MakeWH(1 * SK_Scalar1, 10 * SK_Scalar1)); in draw_column() 61 SkRect target (SkRect::MakeWH(10 * SK_Scalar1, 1 * SK_Scalar1)); in draw_bar() 82 canvas->translate(SK_Scalar1 / 5, SK_Scalar1 / 5); 86 canvas->translate(SK_Scalar1 / 5, SK_Scalar1 / 5); 90 canvas->translate(SK_Scalar1 / 5, SK_Scalar1 / 5); 94 canvas->translate(SK_Scalar1 / 5, SK_Scalar1 / 5);
|
D | drawbitmaprect.cpp | 72 SK_Scalar1 / 6, in makebm() 73 2 * SK_Scalar1 / 6, in makebm() 74 3 * SK_Scalar1 / 6, in makebm() 75 4 * SK_Scalar1 / 6, in makebm() 76 5 * SK_Scalar1 / 6, in makebm() 77 SK_Scalar1}; in makebm() 91 mat.postScale(SK_Scalar1 / 4, SK_Scalar1 / 4); in makebm() 191 canvas->translate(SK_Scalar1 * kPadX / 2, in onDraw() 192 SK_Scalar1 * kPadY / 2); in onDraw() 194 SkScalar titleHeight = SK_Scalar1 * 24; in onDraw() [all …]
|
D | drawminibitmaprect.cpp | 47 SK_Scalar1 / 6, in makebm() 48 2 * SK_Scalar1 / 6, in makebm() 49 3 * SK_Scalar1 / 6, in makebm() 50 4 * SK_Scalar1 / 6, in makebm() 51 5 * SK_Scalar1 / 6, in makebm() 52 SK_Scalar1}; in makebm() 67 mat.postScale(SK_Scalar1 / 4, SK_Scalar1 / 4); in makebm() 131 canvas->translate(dstRect.width() + SK_Scalar1 * kPadX, 0); in onDraw() 135 canvas->translate(0, dstRect.height() + SK_Scalar1 * kPadY); in onDraw()
|
D | emboss.cpp | 57 { { SK_Scalar1, SK_Scalar1, SK_Scalar1 }, 0, 128, 16*2 })); in onDraw() 72 { { SK_Scalar1, SK_Scalar1, SK_Scalar1 }, 0, 128, 16*2 })); in onDraw()
|
D | filltypespersp.cpp | 70 SkScalar pos[] = {0, SK_ScalarHalf, SK_Scalar1}; in showFour() 99 3 * SK_ScalarHalf / 2, SK_Scalar1}; in onDraw() 110 mat.setPerspY(SK_Scalar1 / 1000); in onDraw() 118 persp.setPerspX(-SK_Scalar1 / 1800); in onDraw() 119 persp.setPerspY(SK_Scalar1 / 500); in onDraw() 125 showFour(canvas, SK_Scalar1, false); in onDraw() 130 showFour(canvas, SK_Scalar1, true); in onDraw()
|
D | convexpolyclip.cpp | 50 SK_Scalar1 / 6, in make_img() 51 2 * SK_Scalar1 / 6, in make_img() 52 3 * SK_Scalar1 / 6, in make_img() 53 4 * SK_Scalar1 / 6, in make_img() 54 5 * SK_Scalar1 / 6, in make_img() 55 SK_Scalar1}; in make_img() 70 mat.postScale(SK_Scalar1 / 3, SK_Scalar1 / 3); in make_img() 83 paint.setStrokeWidth(SK_Scalar1); in make_img()
|
/third_party/skia/samplecode/ |
D | SampleHairCurves.cpp | 26 canvas->scale(1000 * SK_Scalar1, 1000 * SK_Scalar1); in onDrawContent() 49 ctrlPts.addCircle(pts[0], pts[1], SK_Scalar1 / 200); in onDrawContent() 50 ctrlPts.addCircle(pts[2], pts[3], SK_Scalar1 / 200); in onDrawContent() 51 ctrlPts.addCircle(pts[4], pts[5], SK_Scalar1 / 200); in onDrawContent() 52 ctrlPts.addCircle(pts[6], pts[7], SK_Scalar1 / 200); in onDrawContent() 68 ctrlPts.addCircle(pts[0], pts[1], SK_Scalar1 / 200); in onDrawContent() 69 ctrlPts.addCircle(pts[2], pts[3], SK_Scalar1 / 200); in onDrawContent() 70 ctrlPts.addCircle(pts[4], pts[5], SK_Scalar1 / 200); in onDrawContent() 89 ctrlPts.addCircle(pts[0], pts[1], SK_Scalar1 / 200); in onDrawContent() 90 ctrlPts.addCircle(pts[2], pts[3], SK_Scalar1 / 200); in onDrawContent() [all …]
|
D | SampleDegenerateTwoPtRadials.cpp | 16 SkScalar pos[] = { 0, 0.25f, 0.75f, SK_Scalar1 }; in draw_gradient2() 23 SkASSERT(0 == SkScalarMod(w, SK_Scalar1 * 5)); in draw_gradient2() 50 delta = delta - SK_Scalar1 * intPart; in onDrawContent() 52 delta = SK_Scalar1 - delta; in onDrawContent() 58 SkScalar w = SK_Scalar1 * 500; in onDrawContent() 59 SkScalar h = SK_Scalar1 * 500; in onDrawContent() 60 SkScalar l = SK_Scalar1 * 100; in onDrawContent() 61 SkScalar t = SK_Scalar1 * 100; in onDrawContent() 65 canvas->drawString(txt, l + w / 2 + w * DELTA_SCALE * delta, t + h + SK_Scalar1 * 10, in onDrawContent()
|
D | SampleAnimBlur.cpp | 44 canvas->drawCircle(200 * SK_Scalar1 + 400 * (i % 2) * SK_Scalar1, in onDrawContent() 45 200 * SK_Scalar1 + i / 2 * 400 * SK_Scalar1, in onDrawContent()
|
D | SampleAndroidShadows.cpp | 53 fFunkyRRPath.addRoundRect(SkRect::MakeXYWH(-50, -50, SK_Scalar1 * 100, SK_Scalar1 * 100), in onOnceBeforeDraw() 54 40 * SK_Scalar1, 20 * SK_Scalar1, in onOnceBeforeDraw() 56 fCubicPath.cubicTo(100 * SK_Scalar1, 50 * SK_Scalar1, in onOnceBeforeDraw() 57 20 * SK_Scalar1, 100 * SK_Scalar1, in onOnceBeforeDraw() 58 0 * SK_Scalar1, 0 * SK_Scalar1); in onOnceBeforeDraw()
|
D | SampleGradients.cpp | 49 static const SkScalar gPos0[] = { 0, SK_Scalar1 }; 50 static const SkScalar gPos1[] = { SK_Scalar1/4, SK_Scalar1*3/4 }; 52 0, SK_Scalar1/8, SK_Scalar1/2, SK_Scalar1*7/8, SK_Scalar1
|
/third_party/skia/src/core/ |
D | SkTextFormatParams.h | 16 #define kStdStrikeThru_Offset (-SK_Scalar1 * 6 / 21) 18 #define kStdUnderline_Offset (SK_Scalar1 / 9) 20 #define kStdUnderline_Thickness (SK_Scalar1 / 18) 27 SK_Scalar1*9, 28 SK_Scalar1*36, 31 SK_Scalar1/24, 32 SK_Scalar1/32,
|
D | SkColor.cpp | 42 SkASSERT(v >= 0 && v <= SK_Scalar1); in SkRGBToHSV() 52 SkASSERT(s >= 0 && s <= SK_Scalar1); in SkRGBToHSV() 89 unsigned p = SkScalarRoundToInt((SK_Scalar1 - s) * v * 255); in SkHSVToColor() 90 unsigned q = SkScalarRoundToInt((SK_Scalar1 - (s * f)) * v * 255); in SkHSVToColor() 91 unsigned t = SkScalarRoundToInt((SK_Scalar1 - (s * (SK_Scalar1 - f))) * v * 255); in SkHSVToColor()
|
/third_party/skia/bench/ |
D | DashBench.cpp | 143 path->moveTo(0, -SK_Scalar1); in make_unit_star() 161 path->quadTo(x0, y0 + 400 * SK_Scalar1, in make_quad() 162 x0 + 600 * SK_Scalar1, y0 + 400 * SK_Scalar1); in make_quad() 169 path->cubicTo(x0, y0 + 400 * SK_Scalar1, in make_cubic() 170 x0 + 600 * SK_Scalar1, y0 + 400 * SK_Scalar1, in make_cubic() 171 x0 + 600 * SK_Scalar1, y0); in make_cubic() 222 SkScalar vals[] = { SK_Scalar1, SK_Scalar1 }; in DashLineBench() 238 canvas->drawLine(10 * SK_Scalar1, 10 * SK_Scalar1, in onDraw() 239 640 * SK_Scalar1, 10 * SK_Scalar1, paint); in onDraw() 262 fPathEffect = SkDashPathEffect::Make(vals, 2, SK_Scalar1); in DrawPointsDashingBench() [all …]
|
/third_party/skia/src/utils/ |
D | SkMatrix22.cpp | 18 c = SkScalarCopySign(SK_Scalar1, a); in SkComputeGivensRotation() 23 s = -SkScalarCopySign(SK_Scalar1, b); in SkComputeGivensRotation() 27 SkScalar u = SkScalarCopySign(SkScalarSqrt(SK_Scalar1 + t*t), b); in SkComputeGivensRotation() 28 s = -SK_Scalar1 / u; in SkComputeGivensRotation() 33 SkScalar u = SkScalarCopySign(SkScalarSqrt(SK_Scalar1 + t*t), a); in SkComputeGivensRotation() 34 c = SK_Scalar1 / u; in SkComputeGivensRotation()
|
/third_party/skia/include/core/ |
D | SkScalar.h | 18 #define SK_Scalar1 1.0f macro 108 … SkScalarInvert(x) sk_ieee_float_divide_TODO_IS_DIVIDE_BY_ZERO_SAFE_HERE(SK_Scalar1, (x)) 131 return x < 0 ? -SK_Scalar1 : ((x > 0) ? SK_Scalar1 : 0); in SkScalarSignAsScalar() 134 #define SK_ScalarNearlyZero (SK_Scalar1 / (1 << 12)) 165 SkASSERT(t >= 0 && t <= SK_Scalar1); in SkScalarInterp()
|