Index: src/core/SkTextBlobPriv.h |
diff --git a/src/core/SkTextBlobPriv.h b/src/core/SkTextBlobPriv.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c6892b5d2088b33c407de181b0fdc0ae42c1508 |
--- /dev/null |
+++ b/src/core/SkTextBlobPriv.h |
@@ -0,0 +1,40 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+#ifndef SkTextBlobPriv_DEFINED |
+#define SkTextBlobPriv_DEFINED |
+ |
+#include "SkTextBlob.h" |
+ |
+/** |
+ * Iterate through all of the text runs of the text blob. For example: |
+ * for (SkTextBlob::RunIterator it(blob); !it.done(); it.next()) { |
+ * ..... |
+ * } |
+ */ |
+class SkTextBlob::RunIterator { |
+public: |
+ RunIterator(const SkTextBlob* blob); |
+ |
+ bool done() const; |
+ void next(); |
+ |
+ uint32_t glyphCount() const; |
+ const uint16_t* glyphs() const; |
+ const SkScalar* pos() const; |
+ const SkPoint& offset() const; |
+ void applyFontToPaint(SkPaint*) const; |
+ GlyphPositioning positioning() const; |
+ bool isLCD() const; |
+ |
+private: |
+ const RunRecord* fCurrentRun; |
+ int fRemainingRuns; |
+ |
+ SkDEBUGCODE(uint8_t* fStorageTop;) |
+}; |
+ |
+#endif // SkTextBlobPriv_DEFINED |