OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkTextBlob_DEFINED | 8 #ifndef SkTextBlob_DEFINED |
9 #define SkTextBlob_DEFINED | 9 #define SkTextBlob_DEFINED |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 public: | 40 public: |
41 RunIterator(const SkTextBlob* blob); | 41 RunIterator(const SkTextBlob* blob); |
42 | 42 |
43 bool done() const; | 43 bool done() const; |
44 void next(); | 44 void next(); |
45 | 45 |
46 uint32_t glyphCount() const; | 46 uint32_t glyphCount() const; |
47 const uint16_t* glyphs() const; | 47 const uint16_t* glyphs() const; |
48 const SkScalar* pos() const; | 48 const SkScalar* pos() const; |
49 const SkPoint& offset() const; | 49 const SkPoint& offset() const; |
50 const SkPaint& font() const; | 50 void applyFontToPaint(SkPaint*) const; |
51 GlyphPositioning positioning() const; | 51 GlyphPositioning positioning() const; |
52 | 52 |
53 private: | 53 private: |
54 const SkTextBlob* fBlob; | 54 const SkTextBlob* fBlob; |
55 int fIndex; | 55 int fIndex; |
56 }; | 56 }; |
57 | 57 |
58 // A run is a sequence of glyphs sharing the same font metrics and positioni
ng mode. | 58 // A run is a sequence of glyphs sharing the same font metrics and positioni
ng mode. |
59 struct Run { | 59 struct Run { |
60 uint32_t count; | 60 uint32_t count; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 SkTDArray<SkScalar> fPosBuffer; | 171 SkTDArray<SkScalar> fPosBuffer; |
172 SkTArray<SkTextBlob::Run>* fRuns; | 172 SkTArray<SkTextBlob::Run>* fRuns; |
173 | 173 |
174 SkRect fBounds; | 174 SkRect fBounds; |
175 bool fDeferredBounds; | 175 bool fDeferredBounds; |
176 | 176 |
177 RunBuffer fCurrentRunBuffer; | 177 RunBuffer fCurrentRunBuffer; |
178 }; | 178 }; |
179 | 179 |
180 #endif // SkTextBlob_DEFINED | 180 #endif // SkTextBlob_DEFINED |
OLD | NEW |