xref: /aosp_15_r20/external/pdfium/core/fxge/text_glyph_pos.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2019 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FXGE_TEXT_GLYPH_POS_H_
8 #define CORE_FXGE_TEXT_GLYPH_POS_H_
9 
10 #include "core/fxcrt/fx_coordinates.h"
11 
12 #include "core/fxcrt/unowned_ptr.h"
13 #include "third_party/abseil-cpp/absl/types/optional.h"
14 
15 class CFX_GlyphBitmap;
16 
17 class TextGlyphPos {
18  public:
19   TextGlyphPos();
20   TextGlyphPos(const TextGlyphPos&);
21   ~TextGlyphPos();
22 
23   absl::optional<CFX_Point> GetOrigin(const CFX_Point& offset) const;
24 
25   UnownedPtr<const CFX_GlyphBitmap> m_pGlyph;
26   CFX_Point m_Origin;
27   CFX_PointF m_fDeviceOrigin;
28 };
29 
30 #endif  // CORE_FXGE_TEXT_GLYPH_POS_H_
31