diff options
author | 2009-04-01 18:31:44 +0000 | |
---|---|---|
committer | 2009-04-01 18:31:44 +0000 | |
commit | d252db03d9650013b545ef9781fe993c07f8f314 (patch) | |
tree | 85afe2a17d58115d5e62225487e27308c7ad5f82 /samplecode | |
parent | 6c924ad46c89955e78e071c792ef00df9910b42f (diff) |
API change: SkPath computeBounds -> getBounds
git-svn-id: http://skia.googlecode.com/svn/trunk@140 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleCircle.cpp | 4 | ||||
-rw-r--r-- | samplecode/SampleStrokeText.cpp | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/samplecode/SampleCircle.cpp b/samplecode/SampleCircle.cpp index bfb92d4930..3f39dbd3fd 100644 --- a/samplecode/SampleCircle.cpp +++ b/samplecode/SampleCircle.cpp @@ -13,9 +13,7 @@ static void test_circlebounds(SkCanvas* canvas) { SkRect r = { 1.39999998, 1, 21.3999996, 21 }; SkPath p; p.addOval(r); - SkRect r2; - p.computeBounds(&r2, SkPath::kFast_BoundsType); - SkASSERT(r == r2); + SkASSERT(r == p.getBounds()); #endif } diff --git a/samplecode/SampleStrokeText.cpp b/samplecode/SampleStrokeText.cpp index 0627d51e97..2743897b8c 100644 --- a/samplecode/SampleStrokeText.cpp +++ b/samplecode/SampleStrokeText.cpp @@ -29,8 +29,7 @@ static void lettersToBitmap(SkBitmap* dst, const char chars[], original.getTextWidths(&chars[i], 1, &width); x += width; } - SkRect bounds; - path.computeBounds(&bounds, SkPath::kExact_BoundsType); + SkRect bounds = path.getBounds(); SkScalar sw = -original.getStrokeWidth(); bounds.inset(sw, sw); path.offset(-bounds.fLeft, -bounds.fTop); @@ -76,8 +75,7 @@ static void lettersToBitmap2(SkBitmap* dst, const char chars[], original.getTextWidths(&chars[i], 1, &width); x += width; } - SkRect bounds; - path.computeBounds(&bounds, SkPath::kExact_BoundsType); + SkRect bounds = path.getBounds(); SkScalar sw = -original.getStrokeWidth(); bounds.inset(sw, sw); path.offset(-bounds.fLeft, -bounds.fTop); |