Index: include/utils/SkTextBox.h |
diff --git a/include/utils/SkTextBox.h b/include/utils/SkTextBox.h |
index e217076fed4a8eee43fa9dea698471de3e7f05a8..d4372d1b6ab8f0d07fdb5991f9fc840774413385 100644 |
--- a/include/utils/SkTextBox.h |
+++ b/include/utils/SkTextBox.h |
@@ -60,6 +60,14 @@ public: |
int countLines() const; |
SkScalar getTextHeight() const; |
+ SkTextBlob* snapshotTextBlob(SkScalar* computedBottom) const; |
+ |
+ class Visitor { |
+ public: |
+ virtual ~Visitor() {} |
+ virtual void operator()(const char*, size_t, SkScalar x, SkScalar y, const SkPaint&) = 0; |
+ }; |
+ |
private: |
SkRect fBox; |
SkScalar fSpacingMul, fSpacingAdd; |
@@ -67,6 +75,8 @@ private: |
const char* fText; |
size_t fLen; |
const SkPaint* fPaint; |
+ |
+ SkScalar visit(Visitor&, const char text[], size_t len, const SkPaint&) const; |
}; |
class SkTextLineBreaker { |