diff options
author | Mike Reed <reed@google.com> | 2017-01-23 11:39:45 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-23 17:14:53 +0000 |
commit | 918e144408ba218df919528f8b48c544f4767883 (patch) | |
tree | af398e3c3a1f779024a0d60d6db43aadb58e29ac /site/user | |
parent | 9adfef8680c22ce8980031b4bcb9f1fadd066a80 (diff) |
change clip-bounds getters to always return the rect
(actually fixes undefined result in getClipBounds)
future CLs
- update all callers to new apis
- move/rename virtuals
BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=7400
Change-Id: I45b93014e915c0d1c36d97d948c9ac8931f23258
Reviewed-on: https://skia-review.googlesource.com/7400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'site/user')
-rw-r--r-- | site/user/api/skpaint.md | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/site/user/api/skpaint.md b/site/user/api/skpaint.md index 48f84588e6..a1e17eed26 100644 --- a/site/user/api/skpaint.md +++ b/site/user/api/skpaint.md @@ -504,8 +504,7 @@ SkPathEffect paint.setPathEffect(SkPath2DPathEffect::Make(matrix, path)); paint.setAntiAlias(true); canvas->clear(SK_ColorWHITE); - SkRect bounds; - (void)canvas->getClipBounds(&bounds); + SkRect bounds = canvas->getLocalClipBounds(); bounds.outset(2 * scale, 2 * scale); canvas->drawRect(bounds, paint); } @@ -525,8 +524,7 @@ SkPathEffect lattice.preRotate(30.0f); paint.setPathEffect(SkLine2DPathEffect::Make(0.0f, lattice)); paint.setAntiAlias(true); - SkRect bounds; - (void)canvas->getClipBounds(&bounds); + SkRect bounds = canvas->getLocalClipBounds(); bounds.outset(8.0f, 8.0f); canvas->clear(SK_ColorWHITE); canvas->drawRect(bounds, paint); |