more rect api simplifications
set --> setLTRB
set(pts, count) --> setBounds
Bug: skia:9328
Change-Id: I807c0598a8b23b2f721db118ec41c1607114205a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237038
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp
index 21b2da7..688d57d 100644
--- a/samplecode/SampleRegion.cpp
+++ b/samplecode/SampleRegion.cpp
@@ -61,7 +61,8 @@
SkFontMetrics fm;
font.getMetrics(&fm);
- bounds.set(x, y + fm.fTop, x + font.measureText(text, len, SkTextEncoding::kUTF8), y + fm.fBottom);
+ bounds.setLTRB(x, y + fm.fTop,
+ x + font.measureText(text, len, SkTextEncoding::kUTF8), y + fm.fBottom);
// may need to outset bounds a little, to account for hinting and/or
// antialiasing
@@ -155,7 +156,7 @@
class RegionView : public Sample {
public:
RegionView() {
- fBase.set(100, 100, 150, 150);
+ fBase.setLTRB(100, 100, 150, 150);
fRect = fBase;
fRect.inset(5, 5);
fRect.offset(25, 25);