Home
last modified time | relevance | path

Searched refs:rrect (Results 1 – 25 of 349) sorted by relevance

12345678910>>...14

/third_party/flutter/flutter/packages/flutter/lib/src/painting/
Dbeveled_rectangle_border.dart81 Path _getPath(RRect rrect) {
82 final Offset centerLeft = Offset(rrect.left, rrect.center.dy);
83 final Offset centerRight = Offset(rrect.right, rrect.center.dy);
84 final Offset centerTop = Offset(rrect.center.dx, rrect.top);
85 final Offset centerBottom = Offset(rrect.center.dx, rrect.bottom);
87 final double tlRadiusX = math.max(0.0, rrect.tlRadiusX);
88 final double tlRadiusY = math.max(0.0, rrect.tlRadiusY);
89 final double trRadiusX = math.max(0.0, rrect.trRadiusX);
90 final double trRadiusY = math.max(0.0, rrect.trRadiusY);
91 final double blRadiusX = math.max(0.0, rrect.blRadiusX);
[all …]
Dcontinuous_rectangle_border.dart85 double _clampToShortest(RRect rrect, double value) {
86 return value > rrect.shortestSide ? rrect.shortestSide : value;
89 Path _getPath(RRect rrect) {
90 final double left = rrect.left;
91 final double right = rrect.right;
92 final double top = rrect.top;
93 final double bottom = rrect.bottom;
95 /// of [rrect] to avoid strange tie-fighter shapes.
97 math.max(0.0, _clampToShortest(rrect, rrect.tlRadiusX));
99 math.max(0.0, _clampToShortest(rrect, rrect.tlRadiusY));
[all …]
/third_party/flutter/skia/docs/examples/
DRRect_Corner.cpp9 SkRRect rrect; in draw() local
11 rrect.setRectRadii({30, 10, 100, 60}, corners); in draw()
12 canvas->drawRRect(rrect, paint); in draw()
14 const SkRect r = rrect.getBounds(); in draw()
15 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()
[all …]
DRRect_setNinePatch.cpp9 SkRRect rrect; in draw() local
10 rrect.setNinePatch({30, 10, 100, 60}, 10, 20, 20, 10); in draw()
11 canvas->drawRRect(rrect, paint); in draw()
13 const SkRect r = rrect.getBounds(); in draw()
14 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()
[all …]
DRRect_isNinePatch.cpp12 SkRRect rrect;
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
14 canvas->drawRRect(rrect, paint);
15 canvas->drawString(rrect.isNinePatch() ? "9 patch" : "not 9 patch", 64, 90, paint);
17 rrect.setRectRadii(rrect.getBounds(), radii);
19 canvas->drawRRect(rrect, paint);
20 canvas->drawString(rrect.isNinePatch() ? "9 patch" : "not 9 patch", 64, 90, paint);
DRRect_isComplex.cpp12 SkRRect rrect;
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
14 canvas->drawRRect(rrect, paint);
15 canvas->drawString(rrect.isComplex() ? "complex" : "not complex", 64, 90, paint);
17 rrect.setRectRadii(rrect.getBounds(), radii);
19 canvas->drawRRect(rrect, paint);
20 canvas->drawString(rrect.isComplex() ? "complex" : "not complex", 64, 90, paint);
DRRect_isSimple.cpp12 SkRRect rrect;
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
14 canvas->drawRRect(rrect, paint);
15 canvas->drawString(rrect.isSimple() ? "simple" : "not simple", 64, 90, paint);
17 rrect.setRectRadii(rrect.getBounds(), radii);
19 canvas->drawRRect(rrect, paint);
20 canvas->drawString(rrect.isSimple() ? "simple" : "not simple", 64, 90, paint);
DRRect_getSimpleRadii.cpp8 auto drawDetails = [=](const SkRRect& rrect) {
12 canvas->drawRRect(rrect, paint);
13 SkVector corner = rrect.getSimpleRadii();
19 SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});
20 drawDetails(rrect);
21 rrect.setRectXY(rrect.getBounds(), 5, 8);
22 drawDetails(rrect);
DRRect_isOval.cpp11 SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 40, 30);
12 canvas->drawRRect(rrect, paint);
13 canvas->drawString(rrect.isOval() ? "oval" : "not oval", 64, 90, paint);
14 rrect.setRectXY(rrect.getBounds(), 35, 25);
16 canvas->drawRRect(rrect, paint);
17 canvas->drawString(rrect.isOval() ? "oval" : "not oval", 64, 90, paint);
DRRect_isRect.cpp11 SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});
12 canvas->drawRRect(rrect, paint);
13 canvas->drawString(rrect.isRect() ? "rect" : "not rect", 64, 90, paint);
15 rrect.setRectRadii(rrect.getBounds(), radii);
17 canvas->drawRRect(rrect, paint);
18 canvas->drawString(rrect.isRect() ? "rect" : "not rect", 64, 90, paint);
/third_party/skia/docs/examples/
DRRect_setNinePatch.cpp9 SkRRect rrect; in draw() local
10 rrect.setNinePatch({30, 10, 100, 60}, 10, 20, 20, 10); in draw()
11 canvas->drawRRect(rrect, paint); in draw()
13 const SkRect r = rrect.getBounds(); in draw()
14 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()
[all …]
DRRect_Corner.cpp9 SkRRect rrect; in draw() local
11 rrect.setRectRadii({30, 10, 100, 60}, corners); in draw()
12 canvas->drawRRect(rrect, paint); in draw()
14 const SkRect r = rrect.getBounds(); in draw()
15 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()
[all …]
DRRect_isComplex.cpp12 SkRRect rrect;
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
14 canvas->drawRRect(rrect, paint);
15 canvas->drawString(rrect.isComplex() ? "complex" : "not complex", 64, 90, paint);
17 rrect.setRectRadii(rrect.getBounds(), radii);
19 canvas->drawRRect(rrect, paint);
20 canvas->drawString(rrect.isComplex() ? "complex" : "not complex", 64, 90, paint);
DRRect_isNinePatch.cpp12 SkRRect rrect;
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
14 canvas->drawRRect(rrect, paint);
15 canvas->drawString(rrect.isNinePatch() ? "9 patch" : "not 9 patch", 64, 90, paint);
17 rrect.setRectRadii(rrect.getBounds(), radii);
19 canvas->drawRRect(rrect, paint);
20 canvas->drawString(rrect.isNinePatch() ? "9 patch" : "not 9 patch", 64, 90, paint);
DRRect_isSimple.cpp12 SkRRect rrect;
13 rrect.setRectRadii({30, 10, 100, 60}, radii);
14 canvas->drawRRect(rrect, paint);
15 canvas->drawString(rrect.isSimple() ? "simple" : "not simple", 64, 90, paint);
17 rrect.setRectRadii(rrect.getBounds(), radii);
19 canvas->drawRRect(rrect, paint);
20 canvas->drawString(rrect.isSimple() ? "simple" : "not simple", 64, 90, paint);
DRRect_getSimpleRadii.cpp8 auto drawDetails = [=](const SkRRect& rrect) {
12 canvas->drawRRect(rrect, paint);
13 SkVector corner = rrect.getSimpleRadii();
19 SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});
20 drawDetails(rrect);
21 rrect.setRectXY(rrect.getBounds(), 5, 8);
22 drawDetails(rrect);
DRRect_isOval.cpp11 SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 40, 30);
12 canvas->drawRRect(rrect, paint);
13 canvas->drawString(rrect.isOval() ? "oval" : "not oval", 64, 90, paint);
14 rrect.setRectXY(rrect.getBounds(), 35, 25);
16 canvas->drawRRect(rrect, paint);
17 canvas->drawString(rrect.isOval() ? "oval" : "not oval", 64, 90, paint);
DRRect_isRect.cpp11 SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});
12 canvas->drawRRect(rrect, paint);
13 canvas->drawString(rrect.isRect() ? "rect" : "not rect", 64, 90, paint);
15 rrect.setRectRadii(rrect.getBounds(), radii);
17 canvas->drawRRect(rrect, paint);
18 canvas->drawString(rrect.isRect() ? "rect" : "not rect", 64, 90, paint);
/third_party/flutter/engine/flutter/testing/dart/
Dgeometry_test.dart215 final RRect rrect = RRect.fromRectAndCorners(
223 expect(rrect.contains(const Offset(1.0, 1.0)), isFalse);
224 expect(rrect.contains(const Offset(1.1, 1.1)), isFalse);
225 expect(rrect.contains(const Offset(1.15, 1.15)), isTrue);
226 expect(rrect.contains(const Offset(2.0, 1.0)), isFalse);
227 expect(rrect.contains(const Offset(1.93, 1.07)), isFalse);
228 expect(rrect.contains(const Offset(1.97, 1.7)), isFalse);
229 expect(rrect.contains(const Offset(1.7, 1.97)), isTrue);
230 expect(rrect.contains(const Offset(1.0, 1.99)), isTrue);
234 final RRect rrect = RRect.fromRectAndCorners(
[all …]
/third_party/flutter/skia/src/gpu/effects/
DGrRRectEffect.cpp83 const SkRRect& rrect) { in Make() argument
88 new CircularRRectEffect(edgeType, circularCornerFlags, rrect)); in Make()
92 const SkRRect& rrect) in CircularRRectEffect() argument
94 , fRRect(rrect) in CircularRRectEffect()
119 SkRRect rrect; in TestCreate() local
120 rrect.setRectXY(SkRect::MakeWH(w, h), r, r); in TestCreate()
125 fp = GrRRectEffect::Make(et, rrect, *d->caps()->shaderCaps()); in TestCreate()
295 const SkRRect& rrect = crre.getRRect(); in onSetData() local
296 if (rrect != fPrevRRect) { in onSetData()
297 SkRect rect = rrect.getBounds(); in onSetData()
[all …]
/third_party/skia/src/gpu/effects/
DGrRRectEffect.cpp81 uint32_t circularCornerFlags, const SkRRect& rrect) { in Make() argument
86 new CircularRRectEffect(std::move(inputFP), edgeType, circularCornerFlags, rrect))); in Make()
92 const SkRRect& rrect) in CircularRRectEffect() argument
96 , fRRect(rrect) in CircularRRectEffect()
127 SkRRect rrect; in TestCreate() local
128 rrect.setRectXY(SkRect::MakeWH(w, h), r, r); in TestCreate()
134 std::tie(success, fp) = GrRRectEffect::Make(std::move(fp), et, rrect, in TestCreate()
295 const SkRRect& rrect = crre.fRRect; in onSetData() local
296 if (rrect != fPrevRRect) { in onSetData()
297 SkRect rect = rrect.getBounds(); in onSetData()
[all …]
/third_party/flutter/flutter/packages/flutter/test/painting/
Dstadium_border_test.dart31 ..rrect(
32rrect: RRect.fromRectAndRadius(rect.deflate(5.0), Radius.circular(rect.shortestSide / 2.0 - 5.0)),
91 const RoundedRectangleBorder rrect = RoundedRectangleBorder(side: BorderSide.none);
118 expect(rrect.getOuterPath(rect), looksLikeR);
119 expect(ShapeBorder.lerp(stadium, rrect, 0.1).getOuterPath(rect), looksLikeS);
120 expect(ShapeBorder.lerp(stadium, rrect, 0.9).getOuterPath(rect), looksLikeR);
121 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, rrect, 0.9), stadium, 0.1).getOuterPath(rect), l…
122 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, rrect, 0.9), stadium, 0.9).getOuterPath(rect), l…
123 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, rrect, 0.1), rrect, 0.1).getOuterPath(rect), loo…
124 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, rrect, 0.1), rrect, 0.9).getOuterPath(rect), loo…
[all …]
/third_party/flutter/skia/tools/lua/
Dclassify_rrect_clips.lua6 function classify_rrect(rrect)
7 if (rrect:type() == "simple") then
8 local x, y = rrect:radii(0)
14 elseif (rrect:type() == "complex") then
21 local x, y = rrect:radii(i-1)
56 elseif (rrect:type() == "rect") then
58 elseif (rrect:type() == "oval") then
59 local x, y = rrect:radii(0)
65 elseif (rrect:type() == "empty") then
91 local rrect = t.rrect
[all …]
/third_party/skia/tests/
DGrClipStackTest.cpp124 ElementsBuilder& rrect(const SkRRect& rrect) { in rrect() function in __anon14e25fe30111::ElementsBuilder
125 return this->rrect(rrect, fLocalToDevice, fAA, fOp); in rrect()
127 ElementsBuilder& rrect(const SkRRect& rrect, GrAA aa, SkClipOp op) { in rrect() argument
128 return this->rrect(rrect, fLocalToDevice, aa, op); in rrect()
130 ElementsBuilder& rrect(const SkRRect& rrect, const SkMatrix& m, GrAA aa, SkClipOp op) { in rrect() function in __anon14e25fe30111::ElementsBuilder
131 fElements->push_back({GrShape(rrect), m, op, aa}); in rrect()
266 elementBounds = GrClip::GetPixelIBounds(SkRRectPriv::InnerBounds(e.fShape.rrect()), in getOptimalBounds()
288 return a.fShape.rrect() == b.fShape.rrect(); in compare_elements()
325 cs.clipRRect(e.fLocalToDevice, e.fShape.rrect(), e.fAA, e.fOp); in run()
645 .rrect(r1).rrect(r2) in DEF_TEST()
[all …]
/third_party/skia/gm/
Drrect.cpp107 static void draw_rrect_color(SkCanvas* canvas, const SkRRect& rrect) { in draw_rrect_color() argument
112 if (rrect.isRect()) { in draw_rrect_color()
114 } else if (rrect.isOval()) { in draw_rrect_color()
116 } else if (rrect.isSimple()) { in draw_rrect_color()
121 canvas->drawRRect(rrect, paint); in draw_rrect_color()
124 static void drawrr(SkCanvas* canvas, const SkRRect& rrect, InsetProc proc) { in drawrr() argument
127 proc(rrect, d, d, &rr); in drawrr()
151 SkRRect rrect[4]; in onDraw() local
157 rrect[0].setRect(r); in onDraw()
158 rrect[1].setOval(r); in onDraw()
[all …]

12345678910>>...14