All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ShapedGlyph.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Text.h"
6 #include "Types.h"
7 #include "VectorMath.h"
8 #include "Bounds.h"
9 
10 namespace Eegeo
11 {
12  namespace Text
13  {
14  struct ShapedGlyph
15  {
16  public:
17  ShapedGlyph(u32 codepointUtf32,
18  const v2& position,
19  int texturePage,
20  u16 left,
21  u16 top,
22  u16 right,
23  u16 bottom,
24  const v4& glyphOffsets)
25 
26  : m_glyphOffsets(glyphOffsets)
27  , m_position(position)
28  , m_codepointUtf32(codepointUtf32)
29  , m_texturePage(texturePage)
30  , m_left(left)
31  , m_top(top)
32  , m_right(right)
33  , m_bottom(bottom)
34  {
35  }
36 
37  u32 GetCodepoint() const { return m_codepointUtf32; }
38  v2 GetPosition() const { return m_position; }
39 
40  int GetTexturePage() const { return m_texturePage; }
41  u16 GetLeft() const { return m_left; }
42  u16 GetTop() const { return m_top; }
43  u16 GetRight() const { return m_right; }
44  u16 GetBottom() const { return m_bottom; }
45  v4 GetGlyphOffsets() const { return m_glyphOffsets; }
46 
47 
48  private:
49  v4 m_glyphOffsets;
50  v2 m_position;
51  u32 m_codepointUtf32;
52  int m_texturePage;
53  u16 m_left;
54  u16 m_top;
55  u16 m_right;
56  u16 m_bottom;
57 
58  };
59 
60  }
61 }