EHS
Loading...
Searching...
No Matches
Glyph.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/EHS.h"
4#include "ehs/Vec2.h"
5#include "ehs/Rect.h"
6#include "ehs/Serializer.h"
7
8namespace ehs
9{
10 class EHS_LIB_IO Glyph
11 {
12 private:
13 Char_32 code;
14 Vec2_u64 pos;
15 Vec2_u64 scale;
16 Rect_f uv;
17 Vec2_64 bearing;
18 Vec2_64 advance;
19
20 public:
21 Glyph();
22
24
25 Glyph(const Char_32 code);
26
27 Glyph(const Glyph& glyph);
28
29 Glyph& operator=(const Glyph& glyph);
30
31 bool operator==(const Glyph& glyph) const;
32
33 bool operator!=(const Glyph& glyph) const;
34
35 Char_32 GetCode() const;
36
37 void SetPos(const Vec2_u64& newPos);
38
39 Vec2_u64 GetPos() const;
40
41 void SetScale(const Vec2_u64& newScale);
42
43 Vec2_u64 GetScale() const;
44
45 void SetUV(const Rect_f& newUV);
46
47 Rect_f GetUV() const;
48
49 void SetBearing(const Vec2_64& newBearing);
50
51 Vec2_32 GetBearing() const;
52
53 void SetAdvance(const Vec2_64& newAdvance);
54
55 Vec2_32 GetAdvance() const;
56
57 void Serialize(Serializer<>& ser) const;
58 };
59}
bool operator!=(const T *const first, const ehs::Str< T, N > &second)
Definition Str.h:1967
bool operator==(const T *const first, const ehs::Str< T, N > &second)
Definition Str.h:1957
Glyph()
Definition Glyph.cpp:5
Vec2_32 GetBearing() const
Definition Glyph.cpp:91
void SetAdvance(const Vec2_64 &newAdvance)
Definition Glyph.cpp:96
Vec2_u64 GetPos() const
Definition Glyph.cpp:61
Char_32 GetCode() const
Definition Glyph.cpp:51
Vec2_32 GetAdvance() const
Definition Glyph.cpp:101
void Serialize(Serializer<> &ser) const
Definition Glyph.cpp:106
void SetUV(const Rect_f &newUV)
Definition Glyph.cpp:76
Vec2_u64 GetScale() const
Definition Glyph.cpp:71
void SetScale(const Vec2_u64 &newScale)
Definition Glyph.cpp:66
Glyph & operator=(const Glyph &glyph)
Definition Glyph.cpp:26
Glyph(Serializer< UInt_64 > &ser)
void SetBearing(const Vec2_64 &newBearing)
Definition Glyph.cpp:86
void SetPos(const Vec2_u64 &newPos)
Definition Glyph.cpp:56
Rect_f GetUV() const
Definition Glyph.cpp:81
Definition Serializer.h:25
Definition Anchor.h:6
Vec2< Int_64 > Vec2_64
Definition Vec2.h:374
char32_t Char_32
Definition Types.h:42
Vec2< UInt_64 > Vec2_u64
Definition Vec2.h:372
Rect< float > Rect_f
Definition Rect.h:184
Vec2< Int_32 > Vec2_32
Definition Vec2.h:377