| Flutter Impeller |

glyph_info.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_GLYPH_INFO_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_GLYPH_INFO_H_
7
8 #include "flutter/third_party/skia/modules/skparagraph/include/Paragraph.h"
9 #include "impeller/toolkit/interop/impeller.h"
10 #include "impeller/toolkit/interop/object.h"
11
12 namespace impeller::interop {
13
14 //------------------------------------------------------------------------------
15 /// @brief Internal C++ peer of ImpellerGlyphInfo. For detailed
16 /// documentation, refer to the headerdocs in the public API in
17 /// impeller.h.
18 ///
19 class GlyphInfo final
20 : public Object<GlyphInfo,
21 IMPELLER_INTERNAL_HANDLE_NAME(ImpellerGlyphInfo)> {
22 public:
23 explicit GlyphInfo(skia::textlayout::Paragraph::GlyphInfo info)
24 : info_(info) {}
25
26 ~GlyphInfo();
27
28 GlyphInfo(const GlyphInfo&) = delete;
29
30 GlyphInfo& operator=(const GlyphInfo&) = delete;
31
32 //----------------------------------------------------------------------------
33 /// @see ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin.
34 ///
35 size_t GetGraphemeClusterCodeUnitRangeBegin() const;
36
37 //----------------------------------------------------------------------------
38 /// @see ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd.
39 ///
40 size_t GetGraphemeClusterCodeUnitRangeEnd() const;
41
42 //----------------------------------------------------------------------------
43 /// @see ImpellerGlyphInfoGetGraphemeClusterBounds.
44 ///
45 ImpellerRect GetGraphemeClusterBounds() const;
46
47 //----------------------------------------------------------------------------
48 /// @see ImpellerGlyphInfoIsEllipsis.
49 ///
50 bool IsEllipsis() const;
51
52 //----------------------------------------------------------------------------
53 /// @see ImpellerGlyphInfoGetTextDirection.
54 ///
55 ImpellerTextDirection GetTextDirection() const;
56
57 private:
58 const skia::textlayout::Paragraph::GlyphInfo info_;
59 };
60
61 } // namespace impeller::interop
62
63 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_GLYPH_INFO_H_
impeller::interop::GlyphInfo
Internal C++ peer of ImpellerGlyphInfo. For detailed documentation, refer to the headerdocs in the pu...
Definition: glyph_info.h:21
impeller::interop::GlyphInfo::~GlyphInfo
~GlyphInfo()
impeller::interop::GlyphInfo::GetTextDirection
ImpellerTextDirection GetTextDirection() const
Definition: glyph_info.cc:32
impeller::interop::GlyphInfo::IsEllipsis
bool IsEllipsis() const
Definition: glyph_info.cc:28
impeller::interop::GlyphInfo::GetGraphemeClusterCodeUnitRangeBegin
size_t GetGraphemeClusterCodeUnitRangeBegin() const
Definition: glyph_info.cc:11
impeller::interop::GlyphInfo::GetGraphemeClusterBounds
ImpellerRect GetGraphemeClusterBounds() const
Definition: glyph_info.cc:19
impeller::interop::GlyphInfo::GetGraphemeClusterCodeUnitRangeEnd
size_t GetGraphemeClusterCodeUnitRangeEnd() const
Definition: glyph_info.cc:15
impeller::interop::GlyphInfo::GlyphInfo
GlyphInfo(const GlyphInfo &)=delete
impeller::interop::GlyphInfo::operator=
GlyphInfo & operator=(const GlyphInfo &)=delete
impeller::interop::GlyphInfo::GlyphInfo
GlyphInfo(skia::textlayout::Paragraph::GlyphInfo info)
Definition: glyph_info.h:23
impeller::interop::Object
Definition: object.h:56
impeller.h
ImpellerTextDirection
ImpellerTextDirection
Definition: impeller.h:479
impeller::interop
Definition: context_gles.cc:12
object.h
ImpellerRect
Definition: impeller.h:502