14 #include "include/private/base/SkFloatingPoint.h"
15 #include "include/private/base/SkSafe32.h"
16 #include "include/private/base/SkTFitsIn.h"
79 return MakeXYWH(pt.x(), pt.y(), size.
width(), size.
height());
91 [[nodiscard]]
static constexpr
SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b) {
104 [[nodiscard]]
static constexpr
SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h) {
105 return { x, y, Sk32_sat_add(x, w), Sk32_sat_add(y, h) };
113 constexpr int32_t
left()
const {
return fLeft; }
120 constexpr int32_t
top()
const {
return fTop; }
127 constexpr int32_t
right()
const {
return fRight; }
134 constexpr int32_t
bottom()
const {
return fBottom; }
141 constexpr int32_t
x()
const {
return fLeft; }
148 constexpr int32_t
y()
const {
return fTop; }
151 constexpr SkIPoint
topLeft()
const {
return {fLeft, fTop}; }
158 constexpr int32_t
width()
const {
return Sk32_can_overflow_sub(fRight, fLeft); }
165 constexpr int32_t
height()
const {
return Sk32_can_overflow_sub(fBottom, fTop); }
180 constexpr int64_t
width64()
const {
return (int64_t)fRight - (int64_t)fLeft; }
188 constexpr int64_t
height64()
const {
return (int64_t)fBottom - (int64_t)fTop; }
196 bool isEmpty64()
const {
return fRight <= fLeft || fBottom <= fTop; }
203 int64_t w = this->width64();
204 int64_t h = this->height64();
205 if (w <= 0 || h <= 0) {
209 return !SkTFitsIn<int32_t>(w | h);
242 void setEmpty() { memset(
this, 0,
sizeof(*
this)); }
253 void setLTRB(int32_t left, int32_t top, int32_t right, int32_t bottom) {
268 void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height) {
271 fRight = Sk32_sat_add(x, width);
272 fBottom = Sk32_sat_add(y, height);
275 void setWH(int32_t width, int32_t height) {
285 fRight = size.
width();
302 Sk32_sat_add(fLeft, dx), Sk32_sat_add(fTop, dy),
303 Sk32_sat_add(fRight, dx), Sk32_sat_add(fBottom, dy),
318 return this->makeOffset(offset.x(), offset.y());
334 Sk32_sat_add(fLeft, dx), Sk32_sat_add(fTop, dy),
335 Sk32_sat_sub(fRight, dx), Sk32_sat_sub(fBottom, dy),
352 Sk32_sat_sub(fLeft, dx), Sk32_sat_sub(fTop, dy),
353 Sk32_sat_add(fRight, dx), Sk32_sat_add(fBottom, dy),
368 fLeft = Sk32_sat_add(fLeft, dx);
369 fTop = Sk32_sat_add(fTop, dy);
370 fRight = Sk32_sat_add(fRight, dx);
371 fBottom = Sk32_sat_add(fBottom, dy);
385 this->offset(delta.fX, delta.fY);
395 fRight = Sk64_pin_to_s32((int64_t)fRight + newX - fLeft);
396 fBottom = Sk64_pin_to_s32((int64_t)fBottom + newY - fTop);
411 void inset(int32_t dx, int32_t dy) {
412 fLeft = Sk32_sat_add(fLeft, dx);
413 fTop = Sk32_sat_add(fTop, dy);
414 fRight = Sk32_sat_sub(fRight, dx);
415 fBottom = Sk32_sat_sub(fBottom, dy);
428 void outset(int32_t dx, int32_t dy) { this->inset(-dx, -dy); }
446 void adjust(int32_t dL, int32_t dT, int32_t dR, int32_t dB) {
447 fLeft = Sk32_sat_add(fLeft, dL);
448 fTop = Sk32_sat_add(fTop, dT);
449 fRight = Sk32_sat_add(fRight, dR);
450 fBottom = Sk32_sat_add(fBottom, dB);
464 return x >= fLeft && x < fRight && y >= fTop && y < fBottom;
476 return !r.
isEmpty() && !this->isEmpty() &&
489 inline bool contains(
const SkRect& r)
const;
500 SkASSERT(fLeft < fRight && fTop < fBottom);
514 return this->intersect(*
this, r);
555 if (fLeft > fRight) {
558 if (fTop > fBottom) {
570 return MakeLTRB(std::min(fLeft, fRight), std::min(fTop, fBottom),
571 std::max(fLeft, fRight), std::max(fTop, fBottom));
596 return SkRect{0, 0, 0, 0};
610 return SkRect{0, 0, w, h};
624 return {0, 0,
static_cast<float>(w),
static_cast<float>(h)};
646 [[nodiscard]]
static constexpr
SkRect MakeLTRB(
float l,
float t,
float r,
float b) {
647 return SkRect {l, t, r, b};
659 [[nodiscard]]
static constexpr
SkRect MakeXYWH(
float x,
float y,
float w,
float h) {
660 return SkRect {x, y, x + w, y + h};
682 static_cast<float>(irect.
fLeft),
static_cast<float>(irect.
fTop),
683 static_cast<float>(irect.
fRight),
static_cast<float>(irect.
fBottom)
696 return !(fLeft < fRight && fTop < fBottom);
705 bool isSorted()
const {
return fLeft <= fRight && fTop <= fBottom; }
719 SkASSERT(0 == accum || std::isnan(accum));
723 return !std::isnan(accum);
731 constexpr
float x()
const {
return fLeft; }
738 constexpr
float y()
const {
return fTop; }
745 constexpr
float left()
const {
return fLeft; }
752 constexpr
float top()
const {
return fTop; }
759 constexpr
float right()
const {
return fRight; }
766 constexpr
float bottom()
const {
return fBottom; }
773 constexpr
float width()
const {
return fRight - fLeft; }
780 constexpr
float height()
const {
return fBottom - fTop; }
788 return sk_float_midpoint(fLeft, fRight);
797 return sk_float_midpoint(fTop, fBottom);
803 constexpr SkPoint
center()
const {
return {this->centerX(), this->centerY()}; }
876 void setLTRB(
float left,
float top,
float right,
float bottom) {
893 (void)this->setBoundsCheck(pts, count);
927 void set(
const SkPoint& p0,
const SkPoint& p1) {
928 fLeft = std::min(p0.fX, p1.fX);
929 fRight = std::max(p0.fX, p1.fX);
930 fTop = std::min(p0.fY, p1.fY);
931 fBottom = std::max(p0.fY, p1.fY);
942 void setXYWH(
float x,
float y,
float width,
float height) {
946 fBottom = y + height;
955 void setWH(
float width,
float height) {
961 void setIWH(int32_t width, int32_t height) {
962 this->setWH(width, height);
977 return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy);
999 return MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy);
1014 return MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy);
1045 this->offset(delta.fX, delta.fY);
1055 fRight += newX - fLeft;
1056 fBottom += newY - fTop;
1088 void outset(
float dx,
float dy) { this->inset(-dx, -dy); }
1115 static bool Intersects(
float al,
float at,
float ar,
float ab,
1116 float bl,
float bt,
float br,
float bb) {
1117 float L = std::max(al, bl);
1118 float R = std::min(ar, br);
1119 float T = std::max(at, bt);
1120 float B = std::min(ab, bb);
1121 return L < R && T < B;
1133 return Intersects(fLeft, fTop, fRight, fBottom,
1172 if (fLeft >= fRight || fTop >= fBottom) {
1175 this->joinPossiblyEmptyRect(r);
1186 fLeft = std::min(fLeft, r.
left());
1187 fTop = std::min(fTop, r.
top());
1188 fRight = std::max(fRight, r.
right());
1189 fBottom = std::max(fBottom, r.
bottom());
1200 return x >= fLeft && x < fRight && y >= fTop && y < fBottom;
1213 return !r.
isEmpty() && !this->isEmpty() &&
1228 return !r.
isEmpty() && !this->isEmpty() &&
1241 dst->
setLTRB(sk_float_round2int(fLeft), sk_float_round2int(fTop),
1242 sk_float_round2int(fRight), sk_float_round2int(fBottom));
1254 dst->
setLTRB(sk_float_floor2int(fLeft), sk_float_floor2int(fTop),
1255 sk_float_ceil2int(fRight), sk_float_ceil2int(fBottom));
1266 dst->
setLTRB(sk_float_floor(fLeft), sk_float_floor(fTop),
1267 sk_float_ceil(fRight), sk_float_ceil(fBottom));
1279 dst->
setLTRB(sk_float_ceil2int(fLeft), sk_float_ceil2int(fTop),
1280 sk_float_floor2int(fRight), sk_float_floor2int(fBottom));
1304 this->roundOut(&ir);
1326 if (fLeft > fRight) {
1327 swap(fLeft, fRight);
1330 if (fTop > fBottom) {
1331 swap(fTop, fBottom);
1342 return MakeLTRB(std::min(fLeft, fRight), std::min(fTop, fBottom),
1343 std::max(fLeft, fRight), std::max(fTop, fBottom));
void swap(sk_sp< T > &a, sk_sp< T > &b)
Definition: SkRefCnt.h:341
SkIRect holds four 32-bit integer coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:32
constexpr int64_t height64() const
Returns span on the y-axis.
Definition: SkRect.h:188
void sort()
Swaps fLeft and fRight if fLeft is greater than fRight; and swaps fTop and fBottom if fTop is greater...
Definition: SkRect.h:553
constexpr int32_t x() const
Returns left edge of SkIRect, if sorted.
Definition: SkRect.h:141
friend bool operator!=(const SkIRect &a, const SkIRect &b)
Returns true if any member in a: fLeft, fTop, fRight, and fBottom; is not identical to the correspond...
Definition: SkRect.h:231
void adjust(int32_t dL, int32_t dT, int32_t dR, int32_t dB)
Adjusts SkIRect by adding dL to fLeft, dT to fTop, dR to fRight, and dB to fBottom.
Definition: SkRect.h:446
SkIRect makeOutset(int32_t dx, int32_t dy) const
Returns SkIRect, outset by (dx, dy).
Definition: SkRect.h:350
void inset(int32_t dx, int32_t dy)
Insets SkIRect by (dx,dy).
Definition: SkRect.h:411
bool isEmpty64() const
Returns true if fLeft is equal to or greater than fRight, or if fTop is equal to or greater than fBot...
Definition: SkRect.h:196
bool contains(const SkIRect &r) const
Returns true if SkIRect contains r.
Definition: SkRect.h:475
constexpr int32_t y() const
Returns top edge of SkIRect, if sorted.
Definition: SkRect.h:148
void offset(const SkIPoint &delta)
Offsets SkIRect by adding delta.fX to fLeft, fRight; and by adding delta.fY to fTop,...
Definition: SkRect.h:384
bool intersect(const SkIRect &r)
Returns true if SkIRect intersects r, and sets SkIRect to intersection.
Definition: SkRect.h:513
static bool Intersects(const SkIRect &a, const SkIRect &b)
Returns true if a intersects b.
Definition: SkRect.h:535
int32_t fBottom
larger y-axis bounds
Definition: SkRect.h:36
constexpr int32_t top() const
Returns top edge of SkIRect, if sorted.
Definition: SkRect.h:120
void offsetTo(int32_t newX, int32_t newY)
Offsets SkIRect so that fLeft equals newX, and fTop equals newY.
Definition: SkRect.h:394
bool containsNoEmptyCheck(const SkIRect &r) const
Returns true if SkIRect contains construction.
Definition: SkRect.h:499
constexpr SkISize size() const
Returns spans on the x-axis and y-axis.
Definition: SkRect.h:172
constexpr int32_t bottom() const
Returns bottom edge of SkIRect, if sorted.
Definition: SkRect.h:134
bool intersect(const SkIRect &a, const SkIRect &b)
Returns true if a intersects b, and sets SkIRect to intersection.
constexpr int32_t height() const
Returns span on the y-axis.
Definition: SkRect.h:165
constexpr int32_t right() const
Returns right edge of SkIRect, if sorted.
Definition: SkRect.h:127
int32_t fTop
smaller y-axis bounds
Definition: SkRect.h:34
void join(const SkIRect &r)
Sets SkIRect to the union of itself and r.
constexpr SkIRect makeOffset(SkIVector offset) const
Returns SkIRect offset by (offset.x(), offset.y()).
Definition: SkRect.h:317
static constexpr SkIRect MakeSize(const SkISize &size)
Returns constructed SkIRect set to (0, 0, size.width(), size.height()).
Definition: SkRect.h:66
static constexpr SkIRect MakeEmpty()
Returns constructed SkIRect set to (0, 0, 0, 0).
Definition: SkRect.h:45
constexpr int32_t width() const
Returns span on the x-axis.
Definition: SkRect.h:158
friend bool operator==(const SkIRect &a, const SkIRect &b)
Returns true if all members in a: fLeft, fTop, fRight, and fBottom; are identical to corresponding me...
Definition: SkRect.h:219
constexpr int64_t width64() const
Returns span on the x-axis.
Definition: SkRect.h:180
void offset(int32_t dx, int32_t dy)
Offsets SkIRect by adding dx to fLeft, fRight; and by adding dy to fTop, fBottom.
Definition: SkRect.h:367
void setEmpty()
Sets SkIRect to (0, 0, 0, 0).
Definition: SkRect.h:242
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
Returns constructed SkIRect set to: (x, y, x + w, y + h).
Definition: SkRect.h:104
constexpr SkIRect makeOffset(int32_t dx, int32_t dy) const
Returns SkIRect offset by (dx, dy).
Definition: SkRect.h:300
bool isEmpty() const
Returns true if width() or height() are zero or negative.
Definition: SkRect.h:202
void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height)
Sets SkIRect to: (x, y, x + width, y + height).
Definition: SkRect.h:268
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
Returns constructed SkIRect set to (0, 0, w, h).
Definition: SkRect.h:56
constexpr SkIPoint topLeft() const
Definition: SkRect.h:151
void setWH(int32_t width, int32_t height)
Definition: SkRect.h:275
SkIRect makeInset(int32_t dx, int32_t dy) const
Returns SkIRect, inset by (dx, dy).
Definition: SkRect.h:332
int32_t fLeft
smaller x-axis bounds
Definition: SkRect.h:33
SkIRect makeSorted() const
Returns SkIRect with fLeft and fRight swapped if fLeft is greater than fRight; and with fTop and fBot...
Definition: SkRect.h:569
void outset(int32_t dx, int32_t dy)
Outsets SkIRect by (dx, dy).
Definition: SkRect.h:428
static constexpr SkIRect MakePtSize(SkIPoint pt, SkISize size)
Returns constructed SkIRect set to (pt.x(), pt.y(), pt.x() + size.width(), pt.y() + size....
Definition: SkRect.h:78
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
Returns constructed SkIRect set to (l, t, r, b).
Definition: SkRect.h:91
constexpr int32_t left() const
Returns left edge of SkIRect, if sorted.
Definition: SkRect.h:113
void setLTRB(int32_t left, int32_t top, int32_t right, int32_t bottom)
Sets SkIRect to (left, top, right, bottom).
Definition: SkRect.h:253
bool contains(int32_t x, int32_t y) const
Returns true if: fLeft <= x < fRight && fTop <= y < fBottom.
Definition: SkRect.h:463
int32_t fRight
larger x-axis bounds
Definition: SkRect.h:35
void setSize(SkISize size)
Definition: SkRect.h:282
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:19
int32_t fHeight
Definition: SkSize.h:17
int32_t fWidth
Definition: SkSize.h:16
constexpr int32_t width() const
Definition: SkSize.h:35
constexpr int32_t height() const
Definition: SkSize.h:36
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582
constexpr SkRect makeOffset(SkVector v) const
Returns SkRect offset by v.
Definition: SkRect.h:985
SkRect makeSorted() const
Returns SkRect with fLeft and fRight swapped if fLeft is greater than fRight; and with fTop and fBott...
Definition: SkRect.h:1341
static SkRect Make(const SkISize &size)
Returns constructed SkIRect set to (0, 0, size.width(), size.height()).
Definition: SkRect.h:669
void offsetTo(float newX, float newY)
Offsets SkRect so that fLeft equals newX, and fTop equals newY.
Definition: SkRect.h:1054
static constexpr SkRect MakeEmpty()
Returns constructed SkRect set to (0, 0, 0, 0).
Definition: SkRect.h:595
bool intersect(const SkRect &a, const SkRect &b)
Returns true if a intersects b, and sets SkRect to intersection.
static bool Intersects(const SkRect &a, const SkRect &b)
Returns true if a intersects b.
Definition: SkRect.h:1144
void toQuad(SkPoint quad[4]) const
Returns four points in quad that enclose SkRect ordered as: top-left, top-right, bottom-right,...
bool contains(float x, float y) const
Returns true if: fLeft <= x < fRight && fTop <= y < fBottom.
Definition: SkRect.h:1199
void joinNonEmptyArg(const SkRect &r)
Sets SkRect to the union of itself and r.
Definition: SkRect.h:1169
constexpr float left() const
Returns left edge of SkRect, if sorted.
Definition: SkRect.h:745
float fLeft
smaller x-axis bounds
Definition: SkRect.h:583
void offset(const SkPoint &delta)
Offsets SkRect by adding delta.fX to fLeft, fRight; and by adding delta.fY to fTop,...
Definition: SkRect.h:1044
float fBottom
larger y-axis bounds
Definition: SkRect.h:586
static SkRect Make(const SkIRect &irect)
Returns constructed SkIRect set to irect, promoting integers to float.
Definition: SkRect.h:680
friend bool operator==(const SkRect &a, const SkRect &b)
Returns true if all members in a: fLeft, fTop, fRight, and fBottom; are equal to the corresponding me...
Definition: SkRect.h:815
void inset(float dx, float dy)
Insets SkRect by (dx, dy).
Definition: SkRect.h:1071
void setXYWH(float x, float y, float width, float height)
Sets SkRect to (x, y, x + width, y + height).
Definition: SkRect.h:942
constexpr SkRect makeOffset(float dx, float dy) const
Returns SkRect offset by (dx, dy).
Definition: SkRect.h:976
bool isFinite() const
Returns true if all values in the rectangle are finite.
Definition: SkRect.h:711
constexpr float top() const
Returns top edge of SkRect, if sorted.
Definition: SkRect.h:752
void joinPossiblyEmptyRect(const SkRect &r)
Sets SkRect to the union of itself and the construction.
Definition: SkRect.h:1185
void roundIn(SkIRect *dst) const
Sets SkRect by rounding up fLeft and fTop; and discarding the fractional portion of fRight and fBotto...
Definition: SkRect.h:1277
bool intersect(const SkRect &r)
Returns true if SkRect intersects r, and sets SkRect to intersection.
constexpr float x() const
Returns left edge of SkRect, if sorted.
Definition: SkRect.h:731
static SkRect MakeIWH(int w, int h)
Returns constructed SkRect set to integer values (0, 0, w, h).
Definition: SkRect.h:623
void outset(float dx, float dy)
Outsets SkRect by (dx, dy).
Definition: SkRect.h:1088
void roundOut(SkRect *dst) const
Sets SkRect by discarding the fractional portion of fLeft and fTop; and rounding up fRight and fBotto...
Definition: SkRect.h:1265
constexpr float y() const
Returns top edge of SkRect, if sorted.
Definition: SkRect.h:738
SkRect makeOutset(float dx, float dy) const
Returns SkRect, outset by (dx, dy).
Definition: SkRect.h:1013
void setWH(float width, float height)
Sets SkRect to (0, 0, width, height).
Definition: SkRect.h:955
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Returns constructed SkRect set to (x, y, x + w, y + h).
Definition: SkRect.h:659
bool contains(const SkRect &r) const
Returns true if SkRect contains r.
Definition: SkRect.h:1211
bool intersects(const SkRect &r) const
Returns true if SkRect intersects r.
Definition: SkRect.h:1132
SkRect makeInset(float dx, float dy) const
Returns SkRect, inset by (dx, dy).
Definition: SkRect.h:998
void set(const SkPoint &p0, const SkPoint &p1)
Sets bounds to the smallest SkRect enclosing SkPoint p0 and p1.
Definition: SkRect.h:927
const float * asScalars() const
Returns pointer to first float in SkRect, to treat it as an array with four entries.
Definition: SkRect.h:1351
bool contains(const SkIRect &r) const
Returns true if SkRect contains r.
Definition: SkRect.h:1226
float fTop
smaller y-axis bounds
Definition: SkRect.h:584
SkIRect roundOut() const
Sets SkIRect by discarding the fractional portion of fLeft and fTop; and rounding up fRight and fBott...
Definition: SkRect.h:1302
void roundOut(SkIRect *dst) const
Sets SkIRect by discarding the fractional portion of fLeft and fTop; and rounding up fRight and fBott...
Definition: SkRect.h:1252
constexpr float centerX() const
Returns average of left edge and right edge.
Definition: SkRect.h:787
void offset(float dx, float dy)
Offsets SkRect by adding dx to fLeft, fRight; and by adding dy to fTop, fBottom.
Definition: SkRect.h:1027
static constexpr SkRect MakeSize(const SkSize &size)
Returns constructed SkRect set to (0, 0, size.width(), size.height()).
Definition: SkRect.h:633
SkIRect roundIn() const
Sets SkIRect by rounding up fLeft and fTop; and discarding the fractional portion of fRight and fBott...
Definition: SkRect.h:1314
void round(SkIRect *dst) const
Sets SkIRect by adding 0.5 and discarding the fractional portion of SkRect members,...
Definition: SkRect.h:1239
constexpr float height() const
Returns span on the y-axis.
Definition: SkRect.h:780
constexpr float right() const
Returns right edge of SkRect, if sorted.
Definition: SkRect.h:759
bool setBoundsCheck(const SkPoint pts[], int count)
Sets to bounds of SkPoint array with count entries.
SkIRect round() const
Returns SkIRect by adding 0.5 and discarding the fractional portion of SkRect members,...
Definition: SkRect.h:1289
void setIWH(int32_t width, int32_t height)
Definition: SkRect.h:961
void setLTRB(float left, float top, float right, float bottom)
Sets SkRect to (left, top, right, bottom).
Definition: SkRect.h:876
void setBounds(const SkPoint pts[], int count)
Sets to bounds of SkPoint array with count entries.
Definition: SkRect.h:892
constexpr float centerY() const
Returns average of top edge and bottom edge.
Definition: SkRect.h:796
constexpr float width() const
Returns span on the x-axis.
Definition: SkRect.h:773
bool isEmpty() const
Returns true if fLeft is equal to or greater than fRight, or if fTop is equal to or greater than fBot...
Definition: SkRect.h:693
float fRight
larger x-axis bounds
Definition: SkRect.h:585
void join(const SkRect &r)
Sets SkRect to the union of itself and r.
void sort()
Swaps fLeft and fRight if fLeft is greater than fRight; and swaps fTop and fBottom if fTop is greater...
Definition: SkRect.h:1324
constexpr SkPoint center() const
Returns the point this->centerX(), this->centerY().
Definition: SkRect.h:803
void dump() const
Writes text representation of SkRect to standard output.
Definition: SkRect.h:1367
void dumpHex() const
Writes text representation of SkRect to standard output.
Definition: SkRect.h:1376
void setBoundsNoCheck(const SkPoint pts[], int count)
Sets to bounds of SkPoint pts array with count entries.
friend bool operator!=(const SkRect &a, const SkRect &b)
Returns true if any in a: fLeft, fTop, fRight, and fBottom; does not equal the corresponding members ...
Definition: SkRect.h:832
static constexpr SkRect MakeWH(float w, float h)
Returns constructed SkRect set to float values (0, 0, w, h).
Definition: SkRect.h:609
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
Returns constructed SkRect set to (l, t, r, b).
Definition: SkRect.h:646
bool isSorted() const
Returns true if fLeft is equal to or less than fRight, or if fTop is equal to or less than fBottom.
Definition: SkRect.h:705
void set(const SkIRect &src)
Sets SkRect to src, promoting src members from integer to float.
Definition: SkRect.h:860
void dump(bool asHex) const
Writes text representation of SkRect to standard output.
constexpr float bottom() const
Returns bottom edge of SkRect, if sorted.
Definition: SkRect.h:766
void setEmpty()
Sets SkRect to (0, 0, 0, 0).
Definition: SkRect.h:853
SkScalar fHeight
Definition: SkSize.h:53
SkScalar fWidth
Definition: SkSize.h:52