| Index: include/core/SkRect.h
|
| diff --git a/include/core/SkRect.h b/include/core/SkRect.h
|
| index 8d68c97febb730ec29bf694964bc4254a4b565c4..5c806a963b8bb39e7896ea3885b82611a63faf9a 100644
|
| --- a/include/core/SkRect.h
|
| +++ b/include/core/SkRect.h
|
| @@ -162,17 +162,24 @@ struct SK_API SkIRect {
|
| /**
|
| * Return a new IRect, built as an offset of this rect.
|
| */
|
| - SkIRect makeOffset(int dx, int dy) const {
|
| + SkIRect makeOffset(int32_t dx, int32_t dy) const {
|
| return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy);
|
| }
|
|
|
| /**
|
| * Return a new IRect, built as an inset of this rect.
|
| */
|
| - SkIRect makeInset(int dx, int dy) const {
|
| + SkIRect makeInset(int32_t dx, int32_t dy) const {
|
| return MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy);
|
| }
|
|
|
| + /**
|
| + * Return a new Rect, built as an outset of this rect.
|
| + */
|
| + SkIRect makeOutset(int32_t dx, int32_t dy) const {
|
| + return MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy);
|
| + }
|
| +
|
| /** Offset set the rectangle by adding dx to its left and right,
|
| and adding dy to its top and bottom.
|
| */
|
| @@ -608,7 +615,7 @@ struct SK_API SkRect {
|
| SkRect makeOffset(SkScalar dx, SkScalar dy) const {
|
| return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy);
|
| }
|
| -
|
| +
|
| /**
|
| * Return a new Rect, built as an inset of this rect.
|
| */
|
| @@ -616,6 +623,13 @@ struct SK_API SkRect {
|
| return MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy);
|
| }
|
|
|
| + /**
|
| + * Return a new Rect, built as an outset of this rect.
|
| + */
|
| + SkRect makeOutset(SkScalar dx, SkScalar dy) const {
|
| + return MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy);
|
| + }
|
| +
|
| /** Offset set the rectangle by adding dx to its left and right,
|
| and adding dy to its top and bottom.
|
| */
|
|
|