add alias for MakeFromIRect (just Make)

git-svn-id: http://skia.googlecode.com/svn/trunk@7340 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-01-23 15:37:56 +00:00
parent 23c2939a4f
commit 1d6cff7293

View File

@ -384,6 +384,7 @@ struct SK_API SkRect {
return r;
}
// DEPRECATED: call Make(r)
static SkRect SK_WARN_UNUSED_RESULT MakeFromIRect(const SkIRect& irect) {
SkRect r;
r.set(SkIntToScalar(irect.fLeft),
@ -392,7 +393,16 @@ struct SK_API SkRect {
SkIntToScalar(irect.fBottom));
return r;
}
static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) {
SkRect r;
r.set(SkIntToScalar(irect.fLeft),
SkIntToScalar(irect.fTop),
SkIntToScalar(irect.fRight),
SkIntToScalar(irect.fBottom));
return r;
}
/**
* Return true if the rectangle's width or height are <= 0
*/