OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const Font*, | 60 const Font*, |
61 const TextRun&, | 61 const TextRun&, |
62 float positionOffset, | 62 float positionOffset, |
63 unsigned count); | 63 unsigned count); |
64 ~ShapeResult(); | 64 ~ShapeResult(); |
65 | 65 |
66 float width() const { return m_width; } | 66 float width() const { return m_width; } |
67 const FloatRect& bounds() const { return m_glyphBoundingBox; } | 67 const FloatRect& bounds() const { return m_glyphBoundingBox; } |
68 unsigned numCharacters() const { return m_numCharacters; } | 68 unsigned numCharacters() const { return m_numCharacters; } |
69 void fallbackFonts(HashSet<const SimpleFontData*>*) const; | 69 void fallbackFonts(HashSet<const SimpleFontData*>*) const; |
70 bool rtl() const { return m_direction == RTL; } | 70 bool rtl() const { |
| 71 return static_cast<TextDirection>(m_direction) == TextDirection::Rtl; |
| 72 } |
71 bool hasVerticalOffsets() const { return m_hasVerticalOffsets; } | 73 bool hasVerticalOffsets() const { return m_hasVerticalOffsets; } |
72 | 74 |
73 // For memory reporting. | 75 // For memory reporting. |
74 size_t byteSize() const; | 76 size_t byteSize() const; |
75 | 77 |
76 int offsetForPosition(float targetX, bool includePartialGlyphs) const; | 78 int offsetForPosition(float targetX, bool includePartialGlyphs) const; |
77 | 79 |
78 PassRefPtr<ShapeResult> applySpacingToCopy(ShapeResultSpacing&, | 80 PassRefPtr<ShapeResult> applySpacingToCopy(ShapeResultSpacing&, |
79 const TextRun&) const; | 81 const TextRun&) const; |
80 | 82 |
(...skipping 29 matching lines...) Expand all Loading... |
110 // Tracks whether any runs contain glyphs with a y-offset != 0. | 112 // Tracks whether any runs contain glyphs with a y-offset != 0. |
111 unsigned m_hasVerticalOffsets : 1; | 113 unsigned m_hasVerticalOffsets : 1; |
112 | 114 |
113 friend class HarfBuzzShaper; | 115 friend class HarfBuzzShaper; |
114 friend class ShapeResultBuffer; | 116 friend class ShapeResultBuffer; |
115 }; | 117 }; |
116 | 118 |
117 } // namespace blink | 119 } // namespace blink |
118 | 120 |
119 #endif // ShapeResult_h | 121 #endif // ShapeResult_h |
OLD | NEW |