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
44
45// Text that will be made mesh
52MRC_API void MR_SymbolMeshParams_Set_text(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
53
54// Text that will be made mesh
59
60// Detailization of Bezier curves on font glyphs
65
66// Detailization of Bezier curves on font glyphs
71
72// Detailization of Bezier curves on font glyphs
77
78// Additional offset between symbols
79// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
80// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
85
86// Additional offset between symbols
87// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
88// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
94
95// Additional offset between symbols
96// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
97// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
102
103// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
104// 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// 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// alignment of the text inside bbox
129
130// alignment of the text inside bbox
136
137// alignment of the text inside bbox
142
143// Path to font file
148
149// Path to font file
155MRC_API void MR_SymbolMeshParams_Set_pathToFontFile(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
156
157// Path to font file
162
166
171
182MRC_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);
183
187
191
196
200
205
208
211
218
219// converts text string into set of contours
224
225// converts text string into Z-facing symbol mesh
230
231#ifdef __cplusplus
232} // extern "C"
233#endif
struct MR_TextMeshAlignParams MR_TextMeshAlignParams
Definition MRAlignTextToMesh.h:32
struct MR_SymbolMeshParams MR_SymbolMeshParams
Definition MRAlignTextToMesh.h:18
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.
MR_PassBy
Definition common.h:23
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:19
#define MRC_API
Definition exports.h:11
Definition MRVector2.h:45