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#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_TextMeshAlignParams MR_TextMeshAlignParams; // Defined in `#include <MRCSymbolMesh/MRAlignTextToMesh.h>`.
15typedef struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_MR_Mesh_std_string.h>`.
16typedef 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>`.
17typedef struct MR_std_filesystem_path MR_std_filesystem_path; // Defined in `#include <MRCMisc/std_filesystem_path.h>`.
18typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
19
20
27
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
50MRC_API void MR_SymbolMeshParams_Set_text(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
51
52// Text that will be made mesh
57
58// Detailization of Bezier curves on font glyphs
63
64// Detailization of Bezier curves on font glyphs
68
69// Detailization of Bezier curves on font glyphs
74
75// Additional offset between symbols
76// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
77// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
82
83// Additional offset between symbols
84// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
85// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
89
90// Additional offset between symbols
91// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
92// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
97
98// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
99// note: changing this to non-zero values cause costly calculations
104
105// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
106// note: changing this to non-zero values cause costly calculations
110
111// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
112// note: changing this to non-zero values cause costly calculations
117
118// alignment of the text inside bbox
123
124// alignment of the text inside bbox
128
129// alignment of the text inside bbox
134
135// Path to font file
140
141// Path to font file
145MRC_API void MR_SymbolMeshParams_Set_pathToFontFile(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
146
147// Path to font file
152
156
161
167MRC_API MR_SymbolMeshParams *MR_SymbolMeshParams_ConstructFrom(const char *text, const char *text_end, int32_t fontDetalization, MR_Vector2f symbolsDistanceAdditionalOffset, float symbolsThicknessOffsetModifier, MR_AlignType align, const char *pathToFontFile, const char *pathToFontFile_end);
168
171
174
179
183
187
190
193
198
199// converts text string into set of contours
204
205// converts text string into Z-facing symbol mesh
210
211#ifdef __cplusplus
212} // extern "C"
213#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:18
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 int32_t * MR_SymbolMeshParams_Get_fontDetalization(const MR_SymbolMeshParams *_this)
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, int32_t fontDetalization, MR_Vector2f symbolsDistanceAdditionalOffset, float symbolsThicknessOffsetModifier, MR_AlignType align, const char *pathToFontFile, const char *pathToFontFile_end)
MRC_API void MR_SymbolMeshParams_Set_fontDetalization(MR_SymbolMeshParams *_this, int32_t value)
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_DestroyArray(const MR_SymbolMeshParams *_this)
Destroys a heap-allocated array of MR_SymbolMeshParams. Does nothing if the pointer is null.
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_DefaultConstruct(void)
MRC_API MR_SymbolMeshParams * MR_SymbolMeshParams_DefaultConstructArray(size_t num_elems)
MR_AlignType
Definition MRSymbolMesh.h:22
@ MR_AlignType_Center
Definition MRSymbolMesh.h:24
@ MR_AlignType_Left
Definition MRSymbolMesh.h:23
@ MR_AlignType_Right
Definition MRSymbolMesh.h:25
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 int32_t * MR_SymbolMeshParams_GetMutable_fontDetalization(MR_SymbolMeshParams *_this)
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:44