MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / ShapedTextKey

Class ShapedTextKey

modules/gui/gui/src/backend/text_server/font.h:43–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41class TextParagraph;
42
43struct ShapedTextKey {
44 String text;
45 int font_size = 14;
46 float width = 0.f;
47 BitField<TextServer::JustificationFlag> jst_flags = TextServer::JUSTIFICATION_NONE;
48 BitField<TextServer::LineBreakFlag> brk_flags = TextServer::BREAK_MANDATORY;
49 TextServer::Direction direction = TextServer::DIRECTION_AUTO;
50 TextServer::Orientation orientation = TextServer::ORIENTATION_HORIZONTAL;
51
52 bool operator==(const ShapedTextKey& p_b) const
53 {
54 return (font_size == p_b.font_size) && (width == p_b.width) && (jst_flags == p_b.jst_flags) && (brk_flags == p_b.brk_flags) && (direction == p_b.direction) && (orientation == p_b.orientation) && (text == p_b.text);
55 }
56
57 ShapedTextKey() {}
58 ShapedTextKey(const String& p_text, int p_font_size, float p_width, BitField<TextServer::JustificationFlag> p_jst_flags, BitField<TextServer::LineBreakFlag> p_brk_flags, TextServer::Direction p_direction, TextServer::Orientation p_orientation)
59 {
60 text = p_text;
61 font_size = p_font_size;
62 width = p_width;
63 jst_flags = p_jst_flags;
64 brk_flags = p_brk_flags;
65 direction = p_direction;
66 orientation = p_orientation;
67 }
68};
69
70struct ShapedTextKeyHasher {
71 _FORCE_INLINE_ static uint32_t hash(const ShapedTextKey& p_a)

Callers 6

get_string_sizeMethod · 0.85
draw_stringMethod · 0.85
draw_multiline_stringMethod · 0.85
draw_string_outlineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected