| Index: include/core/SkRect.h
|
| diff --git a/include/core/SkRect.h b/include/core/SkRect.h
|
| index 98acb1cda31731a407bfe3db63d23ccdd284a458..8bfa57a8f9f0d71b3a4b6e5fa69cb5e9571fa0d6 100644
|
| --- a/include/core/SkRect.h
|
| +++ b/include/core/SkRect.h
|
| @@ -730,7 +730,7 @@ struct SK_API SkRect {
|
|
|
| /**
|
| * Set the dst rectangle by rounding this rectangle's coordinates to their
|
| - * nearest integer values using SkScalarRound.
|
| + * nearest integer values using SkScalarRoundToInt.
|
| */
|
| void round(SkIRect* dst) const {
|
| SkASSERT(dst);
|
| @@ -772,6 +772,15 @@ struct SK_API SkRect {
|
| SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom));
|
| }
|
|
|
| + /**
|
| + * Return a new SkIRect which is contains the rounded coordinates of this
|
| + * rect using SkScalarRoundToInt.
|
| + */
|
| + SkIRect round() const {
|
| + SkIRect ir;
|
| + this->round(&ir);
|
| + return ir;
|
| + }
|
|
|
| /**
|
| * Swap top/bottom or left/right if there are flipped (i.e. if width()
|
|
|