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
33
34// max font size with 128 << 6 FT_F26Dot6 font size
38
39// Text that will be made mesh
45
46// Text that will be made mesh
53MRC_API void MR_SymbolMeshParams_Set_text(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
54
55// Text that will be made mesh
61
62// Detailization of Bezier curves on font glyphs
68
69// Detailization of Bezier curves on font glyphs
74
75// Detailization of Bezier curves on font glyphs
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
90
91// Additional offset between symbols
92// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
93// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
99
100// Additional offset between symbols
101// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
102// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
108
109// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
110// note: changing this to non-zero values cause costly calculations
116
117// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
118// note: changing this to non-zero values cause costly calculations
123
124// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
125// note: changing this to non-zero values cause costly calculations
131
132// alignment of the text inside bbox
138
139// alignment of the text inside bbox
145
146// alignment of the text inside bbox
152
153// Path to font file
159
160// Path to font file
166MRC_API void MR_SymbolMeshParams_Set_pathToFontFile(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
167
168// Path to font file
174
178
183
194MRC_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);
195
199
203
209
214
219
222
225
232
233// converts text string into set of contours
238
239// converts text string into Z-facing symbol mesh
244
245#ifdef __cplusplus
246} // extern "C"
247#endif
struct MR_TextMeshAlignParams MR_TextMeshAlignParams
Definition MRAlignTextToMesh.h:32
struct MR_SymbolMeshParams MR_SymbolMeshParams
Definition MRAlignTextToMesh.h:19
struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
Definition MRCtm.h:24
struct MR_std_string MR_std_string
Definition MRCtm.h:32
struct MR_std_filesystem_path MR_std_filesystem_path
Definition MRPly.h:20
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)
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)
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.
struct MR_expected_std_vector_std_vector_MR_Vector2f_std_string MR_expected_std_vector_std_vector_MR_Vector2f_std_string
Definition MRSymbolMesh.h:15
Generated from class MR::Vector2f.
Definition MRVector2.h:36