diff options
author | Mike Reed <reed@google.com> | 2018-11-10 10:04:28 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-11-11 22:34:18 +0000 |
commit | 9a06c57d430c837b7117c2d359a1db325d0b98a1 (patch) | |
tree | d7a6485069962492fd207692e572b085f8617ba5 /include | |
parent | 445148df00c63fe138f3b145d3340a3f8d8e20e7 (diff) | |
download | skqp-9a06c57d430c837b7117c2d359a1db325d0b98a1.tar.gz |
impl SkFont::measureText
Bug: skia:
Change-Id: Ibd76b72e8486d89acf4ce9babc18f35357884b2d
Reviewed-on: https://skia-review.googlesource.com/c/170276
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkFont.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/core/SkFont.h b/include/core/SkFont.h index cfa0ac2093..9d7bfa2136 100644 --- a/include/core/SkFont.h +++ b/include/core/SkFont.h @@ -136,7 +136,8 @@ public: return this->textToGlyphs(text, byteLength, encoding, nullptr, 0); } - SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding) const; + SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding, + SkRect* bounds = nullptr) const; SkScalar getMetrics(SkFontMetrics* metrics) const; SkScalar getSpacing() const { return this->getMetrics(nullptr); } |