Home
last modified time | relevance | path

Searched refs:radii (Results 1 – 25 of 81) sorted by relevance

1234

/third_party/skia/gm/
Drrect.cpp32 SkVector radii[4]; in inset0() local
34 radii[i] = src.radii((SkRRect::Corner)i); in inset0()
37 radii[i].fX -= dx; in inset0()
38 radii[i].fY -= dy; in inset0()
40 dst->setRectRadii(r, radii); in inset0()
52 SkVector radii[4]; in inset1() local
54 radii[i] = src.radii((SkRRect::Corner)i); in inset1()
56 dst->setRectRadii(r, radii); in inset1()
68 SkVector radii[4]; in inset2() local
70 radii[i] = src.radii((SkRRect::Corner)i); in inset2()
[all …]
Ddrrect.cpp40 SkVector radii[4] = { in onDraw() local
50 outers[3].setRectRadii(r, radii); in onDraw()
59 inners[4].setRectRadii(r, radii); in onDraw()
/third_party/skia/docs/examples/
DCanvas_drawRRect.cpp10 SkRect radii = {30, 50, 70, 90 }; in draw() local
12 rRect.setNinePatch(outer, radii.fLeft, radii.fTop, radii.fRight, radii.fBottom); in draw()
15 canvas->drawLine(outer.fLeft + radii.fLeft, outer.fTop, in draw()
16 outer.fLeft + radii.fLeft, outer.fBottom, paint); in draw()
17 canvas->drawLine(outer.fRight - radii.fRight, outer.fTop, in draw()
18 outer.fRight - radii.fRight, outer.fBottom, paint); in draw()
19 canvas->drawLine(outer.fLeft, outer.fTop + radii.fTop, in draw()
20 outer.fRight, outer.fTop + radii.fTop, paint); in draw()
21 canvas->drawLine(outer.fLeft, outer.fBottom - radii.fBottom, in draw()
22 outer.fRight, outer.fBottom - radii.fBottom, paint); in draw()
DRRect_Corner.cpp15 canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY, in draw()
16 r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint); in draw()
17 canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY, in draw()
18 r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint); in draw()
19 canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop, in draw()
20 r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint); in draw()
21 canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop, in draw()
22 r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint); in draw()
DRRect_setNinePatch.cpp14 canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY, in draw()
15 r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint); in draw()
16 canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY, in draw()
17 r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint); in draw()
18 canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop, in draw()
19 r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint); in draw()
20 canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop, in draw()
21 r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint); in draw()
DMatrix_mapVectors_2.cpp12 SkVector radii[] = {{7, 7}, {3, 3}, {2, 2}, {4, 0}}; in draw() local
15 rrect.setRectRadii({20, 20, 180, 70}, radii); in draw()
18 matrix.mapVectors(radii, SK_ARRAY_COUNT(radii)); in draw()
DRRect_isSimple.cpp11 SkVector radii[] = {{40, 30}, {40, 30}, {40, 30}, {40, 30}};
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
16 radii[0].fX = 35;
17 rrect.setRectRadii(rrect.getBounds(), radii);
DCanvas_drawRoundRect.cpp7 SkVector radii[] = { {0, 20}, {10, 10}, {10, 20}, {10, 40} }; in draw() local
14 for (size_t i = 0; i < SK_ARRAY_COUNT(radii); ++i) { in draw()
15 canvas->drawRoundRect({10, 10, 60, 40}, radii[i].fX, radii[i].fY, paint); in draw()
DRRect_isComplex.cpp11 SkVector radii[] = {{25, 30}, {40, 30}, {40, 30}, {20, 30}};
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
16 radii[0].fX = 20;
17 rrect.setRectRadii(rrect.getBounds(), radii);
DRRect_isNinePatch.cpp11 SkVector radii[] = {{20, 30}, {40, 30}, {40, 30}, {20, 30}};
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
16 radii[0].fX = 35;
17 rrect.setRectRadii(rrect.getBounds(), radii);
DMatrix_mapVectors.cpp12 const SkVector radii[] = {{8, 4}, {9, 1}, {6, 2}, {7, 3}}; in draw() local
16 matrix.mapVectors(rScaled, radii, SK_ARRAY_COUNT(radii)); in draw()
DPath_addRoundRect_2.cpp9 SkScalar radii[] = { 80, 100, 0, 0, 40, 60, 0, 0 }; in draw() local
14 path.addRoundRect({10, 10, 110, 110}, radii); in draw()
DPath_addRRect.cpp10 SkVector radii[] = {{50, 50}, {0, 0}, {0, 0}, {50, 50}}; in draw() local
11 rrect.setRectRadii({10, 10, 110, 110}, radii); in draw()
DRRect_isRect.cpp14 SkVector radii[] = {{10, 10}, {0, 0}, {0, 0}, {0, 0}};
15 rrect.setRectRadii(rrect.getBounds(), radii);
DRRect_readFromMemory.cpp8 SkVector radii[] = {{5, 5}, {10, 10}, {15, 15}, {5, 5}};
10 rrect.setRectRadii({10, 10, 110, 80}, radii);
DRRect_Type.cpp9 auto drawRRectType = [=](const SkRect& rect, const Radii& radii) {
11 rrect.setRectRadii(rect, radii.data);
/third_party/skia/samplecode/
DSampleClock.cpp46 SkVector radii[4] = {{4,4}, {4,4}, {4,4}, {4,4}}; in onDrawContent() local
47 rrect.setRectRadii(rect, radii); in onDrawContent()
69 radii[0] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
70 radii[1] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
71 radii[2] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
72 radii[3] = SkPoint::Make(2.5f,2.5f); in onDrawContent()
73 rrect.setRectRadii(rect, radii); in onDrawContent()
109 radii[0] = SkPoint::Make(7,7); in onDrawContent()
110 radii[1] = SkPoint::Make(7,7); in onDrawContent()
111 radii[2] = SkPoint::Make(7,7); in onDrawContent()
[all …]
/third_party/skia/src/core/
DSkRRect.cpp147 static bool clamp_to_zero(SkVector radii[4]) { in clamp_to_zero()
152 if (radii[i].fX <= 0 || radii[i].fY <= 0) { in clamp_to_zero()
157 radii[i].fX = 0; in clamp_to_zero()
158 radii[i].fY = 0; in clamp_to_zero()
167 void SkRRect::setRectRadii(const SkRect& rect, const SkVector radii[4]) { in setRectRadii()
172 if (!SkScalarsAreFinite(&radii[0].fX, 8)) { in setRectRadii()
177 memcpy(fRadii, radii, sizeof(fRadii)); in setRectRadii()
359 static bool radii_are_nine_patch(const SkVector radii[4]) { in radii_are_nine_patch()
360 return radii[SkRRect::kUpperLeft_Corner].fX == radii[SkRRect::kLowerLeft_Corner].fX && in radii_are_nine_patch()
361 radii[SkRRect::kUpperLeft_Corner].fY == radii[SkRRect::kUpperRight_Corner].fY && in radii_are_nine_patch()
[all …]
DSkPathMakers.h77 fPts[0] = SkPoint::Make(L + rrect.radii(SkRRect::kUpperLeft_Corner).fX, T); in SkPath_RRectPointIterator()
78 fPts[1] = SkPoint::Make(R - rrect.radii(SkRRect::kUpperRight_Corner).fX, T); in SkPath_RRectPointIterator()
79 fPts[2] = SkPoint::Make(R, T + rrect.radii(SkRRect::kUpperRight_Corner).fY); in SkPath_RRectPointIterator()
80 fPts[3] = SkPoint::Make(R, B - rrect.radii(SkRRect::kLowerRight_Corner).fY); in SkPath_RRectPointIterator()
81 fPts[4] = SkPoint::Make(R - rrect.radii(SkRRect::kLowerRight_Corner).fX, B); in SkPath_RRectPointIterator()
82 fPts[5] = SkPoint::Make(L + rrect.radii(SkRRect::kLowerLeft_Corner).fX, B); in SkPath_RRectPointIterator()
83 fPts[6] = SkPoint::Make(L, B - rrect.radii(SkRRect::kLowerLeft_Corner).fY); in SkPath_RRectPointIterator()
84 fPts[7] = SkPoint::Make(L, T + rrect.radii(SkRRect::kUpperLeft_Corner).fY); in SkPath_RRectPointIterator()
DSkBlurMF.cpp351 const SkVector& UL = rrect.radii(SkRRect::kUpperLeft_Corner); in filterRRectToNine()
352 const SkVector& UR = rrect.radii(SkRRect::kUpperRight_Corner); in filterRRectToNine()
353 const SkVector& LR = rrect.radii(SkRRect::kLowerRight_Corner); in filterRRectToNine()
354 const SkVector& LL = rrect.radii(SkRRect::kLowerLeft_Corner); in filterRRectToNine()
381 SkVector radii[4]; in filterRRectToNine() local
382 radii[SkRRect::kUpperLeft_Corner] = UL; in filterRRectToNine()
383 radii[SkRRect::kUpperRight_Corner] = UR; in filterRRectToNine()
384 radii[SkRRect::kLowerRight_Corner] = LR; in filterRRectToNine()
385 radii[SkRRect::kLowerLeft_Corner] = LL; in filterRRectToNine()
386 smallRR.setRectRadii(smallR, radii); in filterRRectToNine()
[all …]
/third_party/skia/tests/
DRoundRectTest.cpp29 SkVector radii[4] = { in test_tricky_radii() local
33 rr.setRectRadii(r, radii); in test_tricky_radii()
35 REPORTER_ASSERT(reporter, (double) rr.radii(SkRRect::kUpperRight_Corner).fY + in test_tricky_radii()
36 (double) rr.radii(SkRRect::kLowerRight_Corner).fY <= in test_tricky_radii()
70 static const SkVector radii[4] = { { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 } }; in test_empty() local
91 r.setRectRadii(oooRects[i], radii); in test_empty()
113 r.setRectRadii(emptyRects[i], radii); in test_empty()
165 REPORTER_ASSERT(reporter, rquad[i] == rr.radii((SkRRect::Corner) i)); in test_9patch_rrect()
169 SkVector radii[4] = { { l, t }, { r, t }, { r, b }, { l, b } }; in test_9patch_rrect() local
170 rr2.setRectRadii(rect, radii); in test_9patch_rrect()
[all …]
DRRectInPathTest.cpp184 SkVector radii[4] = { in test_tricky_radii() local
188 rr.setRectRadii(r, radii); in test_tricky_radii()
254 SkVector radii[4] = { { l, t }, { r, t }, { r, b }, { l, b } }; in test_9patch_rrect() local
255 rr2.setRectRadii(rect, radii); in test_9patch_rrect()
351 SkPoint radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; in test_round_rect_rects() local
354 rr2.setRectRadii(rect, radii); in test_round_rect_rects()
394 SkPoint radii[4] = { { 0, 0 }, { 20, 20 }, { 50, 50 }, { 20, 50 } }; in test_round_rect_general() local
397 rr2.setRectRadii(rect, radii); in test_round_rect_general()
408 SkPoint radii[4] = { { 50, 100 }, { 100, 50 }, { 50, 100 }, { 100, 50 } }; in test_round_rect_iffy_parameters() local
410 rr1.setRectRadii(rect, radii); in test_round_rect_iffy_parameters()
[all …]
/third_party/skia/src/gpu/
DGrFragmentProcessor.cpp714 SkPoint radii, in Ellipse() argument
719 if (medPrecision && (radii.fX < 0.5f || radii.fY < 0.5f)) { in Ellipse()
723 if (medPrecision && (radii.fX > 255*radii.fY || radii.fY > 255*radii.fX)) { in Ellipse()
727 if (medPrecision && (radii.fX > 16384 || radii.fY > 16384)) { in Ellipse()
784 if (radii.fX > radii.fY) { in Ellipse()
786 invRYSqd = (radii.fX * radii.fX) / (radii.fY * radii.fY); in Ellipse()
787 scale = {radii.fX, 1.f / radii.fX}; in Ellipse()
789 invRXSqd = (radii.fY * radii.fY) / (radii.fX * radii.fX); in Ellipse()
791 scale = {radii.fY, 1.f / radii.fY}; in Ellipse()
794 invRXSqd = 1.f / (radii.fX * radii.fX); in Ellipse()
[all …]
/third_party/skia/src/gpu/effects/
DGrRRectEffect.cpp307 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
314 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX; in onSetData()
321 radius = rrect.radii(SkRRect::kLowerRight_Corner).fX; in onSetData()
328 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX; in onSetData()
335 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
342 radius = rrect.radii(SkRRect::kUpperLeft_Corner).fX; in onSetData()
349 radius = rrect.radii(SkRRect::kUpperRight_Corner).fX; in onSetData()
356 radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX; in onSetData()
613 const SkVector& r0 = rrect.radii(SkRRect::kUpperLeft_Corner); in onSetData()
633 const SkVector& r1 = rrect.radii(SkRRect::kLowerRight_Corner); in onSetData()
[all …]
/third_party/skia/include/core/
DSkRRect.h242 void setRectRadii(const SkRect& rect, const SkVector radii[4]);
267 SkVector radii(Corner corner) const { return fRadii[corner]; } in radii() function
491 SkRRect(const SkRect& rect, const SkVector radii[4], int32_t type) in SkRRect()
493 , fRadii{radii[0], radii[1], radii[2], radii[3]} in SkRRect()

1234