Home
last modified time | relevance | path

Searched refs:SkRRect (Results 1 – 25 of 258) sorted by relevance

1234567891011

/third_party/skia/tests/
DRoundRectTest.cpp19 SkRRect rr; in test_tricky_radii()
32 SkRRect rr; 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()
42 SkRRect rr; in test_empty_crbug_458524()
47 SkRRect other; in test_empty_crbug_458524()
51 REPORTER_ASSERT(reporter, SkRRect::kEmpty_Type == other.getType()); in test_empty_crbug_458524()
72 SkRRect r; in test_empty()
119 REPORTER_ASSERT(reporter, r == SkRRect::MakeEmpty()); in test_empty()
121 REPORTER_ASSERT(reporter, r == SkRRect::MakeEmpty()); in test_empty()
[all …]
DRRectInPathTest.cpp14 static SkRRect path_contains_rrect(skiatest::Reporter* reporter, const SkPath& path, in path_contains_rrect()
16 SkRRect out; in path_contains_rrect()
32 SkRRect xrr = SkRRect::MakeRect(SkRect::MakeEmpty()); in path_contains_rrect()
43 static SkRRect inner_path_contains_rrect(skiatest::Reporter* reporter, const SkRRect& in, in inner_path_contains_rrect()
46 case SkRRect::kEmpty_Type: in inner_path_contains_rrect()
47 case SkRRect::kRect_Type: in inner_path_contains_rrect()
48 case SkRRect::kOval_Type: in inner_path_contains_rrect()
57 SkRRect rrect = path_contains_rrect(reporter, path, &outDir, &outStart); in inner_path_contains_rrect()
62 static void path_contains_rrect_check(skiatest::Reporter* reporter, const SkRRect& in, in path_contains_rrect_check()
64 SkRRect out = inner_path_contains_rrect(reporter, in, dir, start); in path_contains_rrect_check()
[all …]
/third_party/skia/include/core/
DSkRRect.h31 class SK_API SkRRect {
39 SkRRect() = default;
46 SkRRect(const SkRRect& rrect) = default;
53 SkRRect& operator=(const SkRRect& rrect) = default;
114 void setEmpty() { *this = SkRRect(); } in setEmpty()
138 static SkRRect MakeEmpty() { return SkRRect(); } in MakeEmpty()
145 static SkRRect MakeRect(const SkRect& r) { in MakeRect()
146 SkRRect rr; in MakeRect()
158 static SkRRect MakeOval(const SkRect& oval) { in MakeOval()
159 SkRRect rr; in MakeOval()
[all …]
/third_party/skia/src/core/
DSkRRectPriv.h18 static bool IsCircle(const SkRRect& rr) { in IsCircle()
22 static SkVector GetSimpleRadii(const SkRRect& rr) { in GetSimpleRadii()
27 static bool IsSimpleCircular(const SkRRect& rr) { in IsSimpleCircular()
33 static bool IsNearlySimpleCircular(const SkRRect& rr, SkScalar tolerance = SK_ScalarNearlyZero);
35 static bool EqualRadii(const SkRRect& rr) { in EqualRadii()
39 static const SkVector* GetRadiiArray(const SkRRect& rr) { return rr.fRadii; } in GetRadiiArray()
41 static bool AllCornersCircular(const SkRRect& rr, SkScalar tolerance = SK_ScalarNearlyZero);
43 static bool ReadFromBuffer(SkRBuffer* buffer, SkRRect* rr);
45 static void WriteToBuffer(const SkRRect& rr, SkWBuffer* buffer);
48 static bool ContainsPoint(const SkRRect& rr, const SkPoint& p) { in ContainsPoint()
[all …]
DSkRRect.cpp21 void SkRRect::setOval(const SkRect& oval) { in setOval()
43 void SkRRect::setRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) { in setRectXY()
79 void SkRRect::setNinePatch(const SkRect& rect, SkScalar leftRad, SkScalar topRad, in setNinePatch()
167 void SkRRect::setRectRadii(const SkRect& rect, const SkVector radii[4]) { in setRectRadii()
192 bool SkRRect::initializeRect(const SkRect& rect) { in initializeRect()
195 *this = SkRRect(); in initializeRect()
220 bool SkRRect::scaleRadii() { in scaleRadii()
267 bool SkRRect::checkCornerContainment(SkScalar x, SkScalar y) const { in checkCornerContainment()
320 bool SkRRectPriv::IsNearlySimpleCircular(const SkRRect& rr, SkScalar tolerance) { in IsNearlySimpleCircular()
331 bool SkRRectPriv::AllCornersCircular(const SkRRect& rr, SkScalar tolerance) { in AllCornersCircular()
[all …]
DSkPathMakers.h68 SkPath_RRectPointIterator(const SkRRect& rrect, SkPathDirection dir, unsigned startIndex) in SkPath_RRectPointIterator()
77 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()
DSkClipStack.h80 Element(const SkRRect& rrect, const SkMatrix& m, SkClipOp op, bool doAA) { in Element()
114 const SkRRect& getDeviceSpaceRRect() const { in getDeviceSpaceRRect()
144 const SkRRect& asDeviceSpaceRRect() const { in asDeviceSpaceRRect()
174 bool contains(const SkRRect& rrect) const;
214 SkRRect fDeviceSpaceRRect;
249 Element(int saveCount, const SkRRect& rrect, const SkMatrix& m, SkClipOp op, bool doAA) { in Element()
271 void initRRect(int saveCount, const SkRRect&, const SkMatrix&, SkClipOp, bool doAA);
362 bool quickContains(const SkRRect& devRRect) const { in quickContains()
372 void clipRRect(const SkRRect&, const SkMatrix& matrix, SkClipOp, bool doAA);
399 bool isRRect(const SkRect& bounds, SkRRect* rrect, bool* aa) const;
[all …]
DSkBlurMF.cpp85 FilterReturn filterRRectToNine(const SkRRect&, const SkMatrix&,
91 bool filterRRectMask(SkMask* dstM, const SkRRect& r, const SkMatrix& matrix,
164 bool SkBlurMaskFilterImpl::filterRRectMask(SkMask* dst, const SkRRect& r, in filterRRectMask()
188 static bool draw_rrect_into_mask(const SkRRect rrect, SkMask* mask) { in draw_rrect_into_mask()
259 const SkRRect& rrect) { in find_cached_rrect()
264 const SkRRect& rrect) { in add_cached_rrect()
289 SkBlurMaskFilterImpl::filterRRectToNine(const SkRRect& rrect, const SkMatrix& matrix, in filterRRectToNine()
294 case SkRRect::kEmpty_Type: in filterRRectToNine()
298 case SkRRect::kRect_Type: in filterRRectToNine()
302 case SkRRect::kOval_Type: in filterRRectToNine()
[all …]
/third_party/skia/src/gpu/effects/
DGrRRectEffect.cpp29 kTopLeft_CornerFlag = (1 << SkRRect::kUpperLeft_Corner),
30 kTopRight_CornerFlag = (1 << SkRRect::kUpperRight_Corner),
31 kBottomRight_CornerFlag = (1 << SkRRect::kLowerRight_Corner),
32 kBottomLeft_CornerFlag = (1 << SkRRect::kLowerLeft_Corner),
48 uint32_t circularCornerFlags, const SkRRect&);
60 GrClipEdgeType, uint32_t circularCornerFlags, const SkRRect&);
69 SkRRect fRRect;
81 uint32_t circularCornerFlags, const SkRRect& rrect) { in Make()
92 const SkRRect& rrect) in CircularRRectEffect()
127 SkRRect rrect; in TestCreate()
[all …]
/third_party/skia/gm/
Drrect.cpp21 typedef void (*InsetProc)(const SkRRect&, SkScalar dx, SkScalar dy, SkRRect*);
23 static void inset0(const SkRRect& src, SkScalar dx, SkScalar dy, SkRRect* dst) { in inset0()
34 radii[i] = src.radii((SkRRect::Corner)i); in inset0()
43 static void inset1(const SkRRect& src, SkScalar dx, SkScalar dy, SkRRect* dst) { in inset1()
54 radii[i] = src.radii((SkRRect::Corner)i); in inset1()
59 static void inset2(const SkRRect& src, SkScalar dx, SkScalar dy, SkRRect* dst) { in inset2()
70 radii[i] = src.radii((SkRRect::Corner)i); in inset2()
87 static void inset3(const SkRRect& src, SkScalar dx, SkScalar dy, SkRRect* dst) { in inset3()
98 radii[i] = src.radii((SkRRect::Corner)i); in inset3()
107 static void draw_rrect_color(SkCanvas* canvas, const SkRRect& rrect) { in draw_rrect_color()
[all …]
Dbigrrectaaeffect.cpp41 BigRRectAAEffectGM(const SkRRect& rrect, const char* name) in BigRRectAAEffectGM()
92 SkRRect rrect = fRRect; in onDraw()
124 SkRRect fRRect;
140 DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeRect(SkRect::MakeIWH(kSize, kSize)), "rect"); )
141 DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeOval(SkRect::MakeIWH(kSize, kSize)), "circle");…
142 DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeOval(SkRect::MakeIWH(kSize - 1, kSize - 10)), "…
144 DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeRectXY(SkRect::MakeIWH(kSize - 1, kSize - 10), …
145 DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeRectXY(SkRect::MakeIWH(kSize - 1, kSize - 10), …
Dshapes.cpp92 SkTArray<SkRRect> fShapes;
111 const SkRRect& shape = fShapes[i]; in drawShapes()
115 case SkRRect::kRect_Type: in drawShapes()
118 case SkRRect::kOval_Type: in drawShapes()
140 const SkRRect& outer = fShapes[i]; in drawShapes()
141 const SkRRect& inner = fShapes[(i * 7 + 11) % fSimpleShapeCount]; in drawShapes()
171 SkRRect xformedInner; in drawShapes()
/third_party/skia/docs/examples/
DRRect_Corner.cpp9 SkRRect rrect; 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()
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.cpp9 SkRRect rrect; 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()
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()
DRRect_notequal_operator.cpp8 SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, 50, 100);
9 SkRRect rrect2 = SkRRect::MakeRectXY(rrect1.rect(), 50, 50);
10 SkRRect rrect3 = SkRRect::MakeOval(rrect1.rect());
DRRect_equal_operator.cpp8 SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, 50, 200);
9 SkRRect rrect2 = SkRRect::MakeRectXY(rrect1.rect(), 25, 100);
10 SkRRect rrect3 = SkRRect::MakeOval(rrect1.rect());
DCanvas_drawDRRect_a.cpp7 SkRRect outer = SkRRect::MakeRect({20, 40, 210, 200}); in draw()
8 SkRRect inner = SkRRect::MakeOval({60, 70, 170, 160}); in draw()
DRRect_width.cpp7 SkRRect unsorted = SkRRect::MakeRect({ 15, 25, 10, 5 }); in draw()
9 SkRRect large = SkRRect::MakeRect({ -FLT_MAX, 1, FLT_MAX, 2 }); in draw()
DRRect_height.cpp7 SkRRect unsorted = SkRRect::MakeRect({ 15, 25, 10, 20 }); in draw()
9 SkRRect large = SkRRect::MakeRect({ 1, -FLT_MAX, 2, FLT_MAX }); in draw()
DRRect_MakeEmpty.cpp8 SkRRect rrect = SkRRect::MakeEmpty();
9 SkRRect rrect2(rrect);
15 str += SkRRect::kEmpty_Type == rrect2.type() ? "=" : "!";
DRRect_type_2.cpp8 SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});
9 SkRRect rrect2(rrect);
15 str += SkRRect::kEmpty_Type == rrect2.type() ? "=" : "!";
DRRect_getType.cpp8 SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});
9 SkRRect rrect2(rrect);
15 str += SkRRect::kRect_Type == rrect2.getType() ? "=" : "!";
DCanvas_drawDRRect_b.cpp7 SkRRect outer = SkRRect::MakeRect({20, 40, 210, 200}); in draw()
8 SkRRect inner = SkRRect::MakeRectXY({60, 70, 170, 160}, 10, 10); in draw()
DRRect_writeToMemory.cpp8 SkRRect rrect = SkRRect::MakeRect({10, 10, 110, 80});
9 char storage[SkRRect::kSizeInMemory];
11 SkRRect copy;
/third_party/skia/src/gpu/ops/
DFillRRectOp.cpp44 const SkRRect&,
95 const SkRRect&,
115 Instance(const SkMatrix& viewMatrix, const SkRRect& rrect, const SkRect& localRect, in Instance()
119 SkRRect fRRect;
145 const SkRRect&);
151 const SkRRect& rrect, in Make()
190 const SkRRect& rrect, in FillRRectOpImpl()
222 SkRRect clipRRect; in clipToShape()
262 SkRRect isectRRect; in clipToShape()
812 const SkRRect& rrect) { in can_use_hw_derivatives_with_coverage()
[all …]

1234567891011