MeshLib C Docs
Loading...
Searching...
No Matches
MRSymbolMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector2.h>
4#include <MRCMisc/common.h>
5#include <MRCMisc/exports.h>
6
7#include <stddef.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_TextMeshAlignParams MR_TextMeshAlignParams; // Defined in `#include <MRCSymbolMesh/MRAlignTextToMesh.h>`.
14typedef struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_MR_Mesh_std_string.h>`.
15typedef struct MR_expected_std_vector_std_vector_MR_Vector2f_std_string MR_expected_std_vector_std_vector_MR_Vector2f_std_string; // Defined in `#include <MRCMisc/expected_std_vector_std_vector_MR_Vector2f_std_string.h>`.
16typedef struct MR_std_filesystem_path MR_std_filesystem_path; // Defined in `#include <MRCMisc/std_filesystem_path.h>`.
17typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
18
19
26
32
33// max font size with 128 << 6 FT_F26Dot6 font size
37
38// Text that will be made mesh
43
44// Text that will be made mesh
49MRC_API void MR_SymbolMeshParams_Set_text(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
50
51// Text that will be made mesh
56
57// Detailization of Bezier curves on font glyphs
62
63// Detailization of Bezier curves on font glyphs
67
68// Detailization of Bezier curves on font glyphs
73
74// Additional offset between symbols
75// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
76// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
81
82// Additional offset between symbols
83// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
84// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
88
89// Additional offset between symbols
90// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
91// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
96
97// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
98// note: changing this to non-zero values cause costly calculations
103
104// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
105// note: changing this to non-zero values cause costly calculations
109
110// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
111// note: changing this to non-zero values cause costly calculations
116
117// alignment of the text inside bbox
122
123// alignment of the text inside bbox
127
128// alignment of the text inside bbox
133
134// Path to font file
139
140// Path to font file
144MRC_API void MR_SymbolMeshParams_Set_pathToFontFile(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
145
146// Path to font file
151
155
160
166MRC_API MR_SymbolMeshParams *MR_SymbolMeshParams_ConstructFrom(const char *text, const char *text_end, int fontDetalization, MR_Vector2f symbolsDistanceAdditionalOffset, float symbolsThicknessOffsetModifier, MR_AlignType align, const char *pathToFontFile, const char *pathToFontFile_end);
167
170
173
178
182
186
189
192
197
198// converts text string into set of contours
203
204// converts text string into Z-facing symbol mesh
209
210#ifdef __cplusplus
211} // extern "C"
212#endif
struct MR_TextMeshAlignParams MR_TextMeshAlignParams
Definition MRAlignTextToMesh.h:25
struct MR_SymbolMeshParams MR_SymbolMeshParams
Definition MRAlignTextToMesh.h:17
struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
Definition MRCtm.h:17
struct MR_std_string MR_std_string
Definition MRE57.h:22
struct MR_std_filesystem_path MR_std_filesystem_path
Definition MRSceneRoot.h:15
MRC_API const MR_Vector2f * MR_SymbolMeshParams_Get_symbolsDistanceAdditionalOffset(const MR_SymbolMeshParams *_this)
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_OffsetMutablePtr(MR_SymbolMeshParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const float * MR_SymbolMeshParams_Get_symbolsThicknessOffsetModifier(const MR_SymbolMeshParams *_this)
MRC_API const MR_SymbolMeshParams * MR_SymbolMeshParams_OffsetPtr(const MR_SymbolMeshParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API void MR_SymbolMeshParams_Set_symbolsThicknessOffsetModifier(MR_SymbolMeshParams *_this, float value)
MRC_API void MR_SymbolMeshParams_Set_align(MR_SymbolMeshParams *_this, MR_AlignType value)
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_ConstructFrom(const char *text, const char *text_end, int fontDetalization, MR_Vector2f symbolsDistanceAdditionalOffset, float symbolsThicknessOffsetModifier, MR_AlignType align, const char *pathToFontFile, const char *pathToFontFile_end)
MRC_API int * MR_SymbolMeshParams_GetMutable_fontDetalization(MR_SymbolMeshParams *_this)
MRC_API void MR_SymbolMeshParams_Set_pathToFontFile(MR_SymbolMeshParams *_this, const char *value, const char *value_end)
MRC_API MR_expected_std_vector_std_vector_MR_Vector2f_std_string * MR_createSymbolContours(const MR_SymbolMeshParams *params)
MRC_API MR_TextMeshAlignParams * MR_SymbolMeshParams_MutableStaticDowncastTo_MR_TextMeshAlignParams(MR_SymbolMeshParams *object)
MRC_API void MR_SymbolMeshParams_Set_symbolsDistanceAdditionalOffset(MR_SymbolMeshParams *_this, MR_Vector2f value)
MRC_API float * MR_SymbolMeshParams_GetMutable_symbolsThicknessOffsetModifier(MR_SymbolMeshParams *_this)
MRC_API void MR_SymbolMeshParams_Set_fontDetalization(MR_SymbolMeshParams *_this, int value)
MRC_API void MR_SymbolMeshParams_DestroyArray(const MR_SymbolMeshParams *_this)
Destroys a heap-allocated array of MR_SymbolMeshParams. Does nothing if the pointer is null.
MRC_API const int * MR_SymbolMeshParams_Get_fontDetalization(const MR_SymbolMeshParams *_this)
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_DefaultConstruct(void)
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_DefaultConstructArray(size_t num_elems)
MR_AlignType
Definition MRSymbolMesh.h:21
@ MR_AlignType_Center
Definition MRSymbolMesh.h:23
@ MR_AlignType_Left
Definition MRSymbolMesh.h:22
@ MR_AlignType_Right
Definition MRSymbolMesh.h:24
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_SymbolMeshParams *_other)
MRC_API void MR_SymbolMeshParams_Set_text(MR_SymbolMeshParams *_this, const char *value, const char *value_end)
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_AssignFromAnother(MR_SymbolMeshParams *_this, MR_PassBy _other_pass_by, MR_SymbolMeshParams *_other)
MRC_API const MR_std_string * MR_SymbolMeshParams_Get_text(const MR_SymbolMeshParams *_this)
MRC_API MR_expected_MR_Mesh_std_string * MR_createSymbolsMesh(const MR_SymbolMeshParams *params)
MRC_API MR_AlignType * MR_SymbolMeshParams_GetMutable_align(MR_SymbolMeshParams *_this)
MRC_API MR_std_filesystem_path * MR_SymbolMeshParams_GetMutable_pathToFontFile(MR_SymbolMeshParams *_this)
MRC_API const MR_AlignType * MR_SymbolMeshParams_Get_align(const MR_SymbolMeshParams *_this)
MRC_API const MR_TextMeshAlignParams * MR_SymbolMeshParams_StaticDowncastTo_MR_TextMeshAlignParams(const MR_SymbolMeshParams *object)
MRC_API const MR_std_filesystem_path * MR_SymbolMeshParams_Get_pathToFontFile(const MR_SymbolMeshParams *_this)
MRC_API MR_std_string * MR_SymbolMeshParams_GetMutable_text(MR_SymbolMeshParams *_this)
MRC_API MR_Vector2f * MR_SymbolMeshParams_GetMutable_symbolsDistanceAdditionalOffset(MR_SymbolMeshParams *_this)
MRC_API const float * MR_SymbolMeshParams_Get_MaxGeneratedFontHeight(void)
MRC_API void MR_SymbolMeshParams_Destroy(const MR_SymbolMeshParams *_this)
Destroys a heap-allocated instance of MR_SymbolMeshParams. Does nothing if the pointer is null.
MR_PassBy
Definition common.h:19
struct MR_expected_std_vector_std_vector_MR_Vector2f_std_string MR_expected_std_vector_std_vector_MR_Vector2f_std_string
Definition expected_std_vector_std_vector_MR_Vector2f_std_string.h:18
#define MRC_API
Definition exports.h:11
Definition MRVector2.h:43