diff options
author | Cary Clark <caryclark@skia.org> | 2018-05-30 09:20:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-30 13:51:43 +0000 |
commit | 462505f3100f0abc52adfd4506b62719e7151e18 (patch) | |
tree | a92d1ab71edac014cbcaf67d6572a1b8422a4ad2 /include/core/SkMatrix.h | |
parent | 6e4d95f804e7edd918791f75ad32e85ddb1c9990 (diff) |
include refresh
Update the includes to match the bookmaker docs.
All edits are generated; if something looks amiss, I
probably introduced a bug in the generator. Please
let me know.
I was careful to pick up all direct edits to the includes
and add them to their bookmaker counterpart. Please take
a look to see if your favorites are there.
Note that enum and struct members have been shortened
to fit on one line. The intent is to provide more verbose
documentation online. Let me know if this is too terse.
TBR=reed@google.com
Bug: skia:6898
Change-Id: I374673ed884e03e142439d91532efc558deeaccd
Reviewed-on: https://skia-review.googlesource.com/130540
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'include/core/SkMatrix.h')
-rw-r--r-- | include/core/SkMatrix.h | 45 |
1 files changed, 14 insertions, 31 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h index 9733590167..a5873b114e 100644 --- a/include/core/SkMatrix.h +++ b/include/core/SkMatrix.h @@ -109,11 +109,11 @@ public: Used to identify the complexity of SkMatrix, to optimize performance. */ enum TypeMask { - kIdentity_Mask = 0, //!< all bits clear if SkMatrix is identity - kTranslate_Mask = 0x01, //!< set if SkMatrix has translation - kScale_Mask = 0x02, //!< set if SkMatrix has x or y scale - kAffine_Mask = 0x04, //!< set if SkMatrix skews or rotates - kPerspective_Mask = 0x08, //!< set if SkMatrix has perspective + kIdentity_Mask = 0, //!< identity SkMatrix; all bits clear + kTranslate_Mask = 0x01, //!< translation SkMatrix + kScale_Mask = 0x02, //!< scale SkMatrix + kAffine_Mask = 0x04, //!< skew or rotate SkMatrix + kPerspective_Mask = 0x08, //!< perspective SkMatrix }; /** Returns a bit field describing the transformations the matrix may @@ -1069,29 +1069,10 @@ public: how SkMatrix maps to the side or center of the destination SkRect. */ enum ScaleToFit { - /** Computes SkMatrix that scales in x and y independently, so that source SkRect is - mapped to completely fill destination SkRect. The aspect ratio of source SkRect - may change. - */ - kFill_ScaleToFit, - - /** Computes SkMatrix that maintains source SkRect aspect ratio, mapping source SkRect - width or height to destination SkRect. Aligns mapping to left and top edges - of destination SkRect. - */ - kStart_ScaleToFit, - - /** Computes SkMatrix that maintains source SkRect aspect ratio, mapping source SkRect - width or height to destination SkRect. Aligns mapping to center of destination - SkRect. - */ - kCenter_ScaleToFit, - - /** Computes SkMatrix that maintains source SkRect aspect ratio, mapping source SkRect - width or height to destination SkRect. Aligns mapping to right and bottom - edges of destination SkRect. - */ - kEnd_ScaleToFit, + kFill_ScaleToFit, //!< scales in x and y to fill destination SkRect + kStart_ScaleToFit, //!< scales and aligns to left and top + kCenter_ScaleToFit, //!< scales and aligns to center + kEnd_ScaleToFit, //!< scales and aligns to right and bottom }; /** Sets SkMatrix to scale and translate src SkRect to dst SkRect. stf selects whether @@ -1452,9 +1433,11 @@ public: return this->mapRect(rect, *rect); } - /** - * Map the rectangle though the matrix, and return the bounds of the transformed points. - */ + /** Returns bounds of src corners mapped by SkMatrix. + + @param src rectangle to map + @return mapped bounds + */ SkRect mapRect(const SkRect& src) const { SkRect dst; (void)this->mapRect(&dst, src); |