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_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_MR_Mesh_std_string.h>`.
14typedef 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>`.
15typedef struct MR_std_filesystem_path MR_std_filesystem_path; // Defined in `#include <MRCMisc/std_filesystem_path.h>`.
16typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
17
18
25
32
33// max font size with 128 << 6 FT_F26Dot6 font size
37
38// 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
60
61// Detailization of Bezier curves on font glyphs
67
68// Detailization of Bezier curves on font glyphs
73
74// Detailization of Bezier curves on font glyphs
80
81// Additional offset between symbols
82// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
83// 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
98
99// Additional offset between symbols
100// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
101// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
107
108// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
109// note: changing this to non-zero values cause costly calculations
115
116// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
117// note: changing this to non-zero values cause costly calculations
122
123// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
124// note: changing this to non-zero values cause costly calculations
130
131// alignment of the text inside bbox
137
138// alignment of the text inside bbox
144
145// alignment of the text inside bbox
151
152// Path to font file
158
159// Path to font file
165MRC_API void MR_SymbolMeshParams_Set_pathToFontFile(MR_SymbolMeshParams *_this, const char *value, const char *value_end);
166
167// Path to font file
173
177
182
193MRC_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);
194
198
202
207
210
213
220
221// converts text string into set of contours
226
227// converts text string into Z-facing symbol mesh
232
233#ifdef __cplusplus
234} // extern "C"
235#endif
struct MR_SymbolMeshParams MR_SymbolMeshParams
Definition MRAlignTextToMesh.h:20
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 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:20
@ MR_AlignType_Center
Definition MRSymbolMesh.h:22
@ MR_AlignType_Left
Definition MRSymbolMesh.h:21
@ MR_AlignType_Right
Definition MRSymbolMesh.h:23
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_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 include/MRCMisc/exports.h:11
Generated from class MR::Vector2f.
Definition MRVector2.h:36