EHS
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:1916
bool operator==(const T *const first, const ehs::Str< T, N > &second)
Definition: Str.h:1906
Definition: Glyph.h:11
Glyph(Serializer< UInt_64 > &ser)
Definition: Anchor.h:6
char32_t Char_32
Definition: Types.h:42