MeshLib C Docs
Loading...
Searching...
No Matches
MRAlignTextToMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector2.h>
4#include <MRCMesh/MRVector3.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
8
9#include <stdbool.h>
10#include <stddef.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
17typedef struct MR_MeshTriPoint MR_MeshTriPoint; // Defined in `#include <MRCMesh/MRMeshTriPoint.h>`.
18typedef struct MR_SymbolMeshParams MR_SymbolMeshParams; // Defined in `#include <MRCSymbolMesh/MRSymbolMesh.h>`.
19typedef struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_MR_Mesh_std_string.h>`.
20typedef struct MR_std_filesystem_path MR_std_filesystem_path; // Defined in `#include <MRCMisc/std_filesystem_path.h>`.
21typedef struct MR_std_function_MR_CurvePoint_from_float MR_std_function_MR_CurvePoint_from_float; // Defined in `#include <MRCMisc/std_function_MR_CurvePoint_from_float.h>`.
22typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
23typedef struct MR_std_vector_MR_CurvePoint MR_std_vector_MR_CurvePoint; // Defined in `#include <MRCMisc/std_vector_MR_CurvePoint.h>`.
24typedef struct MR_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint; // Defined in `#include <MRCMisc/std_vector_MR_EdgePoint.h>`.
25
26
33
37
43
49
55
62
68
75
81
86
92
98
103
109
115
120
126
132
137
143
149
154
160
166
171
177
178// max font size with 128 << 6 FT_F26Dot6 font size
182
183// Text that will be made mesh
188
189// Text that will be made mesh
194MRC_API void MR_TextMeshAlignParams_Set_text(MR_TextMeshAlignParams *_this, const char *value, const char *value_end);
195
196// Text that will be made mesh
201
202// Detailization of Bezier curves on font glyphs
207
208// Detailization of Bezier curves on font glyphs
212
213// Detailization of Bezier curves on font glyphs
218
219// Additional offset between symbols
220// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
221// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
226
227// Additional offset between symbols
228// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
229// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
233
234// Additional offset between symbols
235// X: In symbol size: 1.0f adds one "space", 0.5 adds half "space".
236// Y: In symbol size: 1.0f adds one base height, 0.5 adds half base height
241
242// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
243// note: changing this to non-zero values cause costly calculations
248
249// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
250// note: changing this to non-zero values cause costly calculations
254
255// Symbols thickness will be modified by this value (newThickness = modifier*baseSymbolHeight + defaultThickness)
256// note: changing this to non-zero values cause costly calculations
261
262// alignment of the text inside bbox
267
268// alignment of the text inside bbox
272
273// alignment of the text inside bbox
278
279// Path to font file
284
285// Path to font file
289MRC_API void MR_TextMeshAlignParams_Set_pathToFontFile(MR_TextMeshAlignParams *_this, const char *value, const char *value_end);
290
291// Path to font file
296
300
305
308
311
315
318
322
325
328
333
340
346
351
357
363
368
374
381
387
394
395// Font height, meters
400
401// Font height, meters
405
406// Font height, meters
411
412// Text mesh inside and outside offset of curve's surface
417
418// Text mesh inside and outside offset of curve's surface
422
423// Text mesh inside and outside offset of curve's surface
428
429// If true then size of each symbol will be calculated from font height, otherwise - on bounding box of the text
434
435// If true then size of each symbol will be calculated from font height, otherwise - on bounding box of the text
439
440// If true then size of each symbol will be calculated from font height, otherwise - on bounding box of the text
445
451
456
462
466
471
474MRC_API MR_BendTextAlongCurveParams *MR_BendTextAlongCurveParams_ConstructFrom(MR_PassBy symbolMesh_pass_by, MR_SymbolMeshParams *symbolMesh, float pivotCurveTime, MR_Vector2f pivotBoxPoint, float fontHeight, float surfaceOffset, bool fontBasedSizeCalc, bool stretch);
475
478
481
485
488
491
496
504
511
521
522#ifdef __cplusplus
523} // extern "C"
524#endif
struct MR_MeshTriPoint MR_MeshTriPoint
Definition MRAggregateFlow.h:13
struct MR_std_function_MR_CurvePoint_from_float MR_std_function_MR_CurvePoint_from_float
Definition MRAlignContoursToMesh.h:18
MRC_API void MR_BendTextAlongCurveParams_Set_fontBasedSizeCalc(MR_BendTextAlongCurveParams *_this, bool value)
MRC_API void MR_TextMeshAlignParams_Set_symbolsDistanceAdditionalOffset(MR_TextMeshAlignParams *_this, MR_Vector2f value)
MRC_API void MR_TextMeshAlignParams_Set_fontDetalization(MR_TextMeshAlignParams *_this, int value)
MRC_API bool * MR_BendTextAlongCurveParams_GetMutable_stretch(MR_BendTextAlongCurveParams *_this)
MRC_API void MR_BendTextAlongCurveParams_Set_fontHeight(MR_BendTextAlongCurveParams *_this, float value)
MRC_API MR_TextMeshAlignParams * MR_TextMeshAlignParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_TextMeshAlignParams *_other)
MRC_API MR_BendTextAlongCurveParams * MR_BendTextAlongCurveParams_ConstructFrom(MR_PassBy symbolMesh_pass_by, MR_SymbolMeshParams *symbolMesh, float pivotCurveTime, MR_Vector2f pivotBoxPoint, float fontHeight, float surfaceOffset, bool fontBasedSizeCalc, bool stretch)
MRC_API MR_SymbolMeshParams * MR_TextMeshAlignParams_MutableUpcastTo_MR_SymbolMeshParams(MR_TextMeshAlignParams *object)
Upcasts an instance of MR::TextMeshAlignParams to its base class MR::SymbolMeshParams.
MRC_API MR_expected_MR_Mesh_std_string * MR_alignTextToMesh(const MR_Mesh *mesh, const MR_TextMeshAlignParams *params)
MRC_API const MR_std_filesystem_path * MR_TextMeshAlignParams_Get_pathToFontFile(const MR_TextMeshAlignParams *_this)
MRC_API void MR_TextMeshAlignParams_DestroyArray(const MR_TextMeshAlignParams *_this)
Destroys a heap-allocated array of MR_TextMeshAlignParams. Does nothing if the pointer is null.
MRC_API void MR_TextMeshAlignParams_Destroy(const MR_TextMeshAlignParams *_this)
Destroys a heap-allocated instance of MR_TextMeshAlignParams. Does nothing if the pointer is null.
struct MR_TextMeshAlignParams MR_TextMeshAlignParams
Definition MRAlignTextToMesh.h:32
MRC_API void MR_TextMeshAlignParams_Set_surfaceOffset(MR_TextMeshAlignParams *_this, float value)
MRC_API void MR_TextMeshAlignParams_Set_direction(MR_TextMeshAlignParams *_this, MR_Vector3f value)
MRC_API const float * MR_BendTextAlongCurveParams_Get_pivotCurveTime(const MR_BendTextAlongCurveParams *_this)
MRC_API void MR_BendTextAlongCurveParams_Set_surfaceOffset(MR_BendTextAlongCurveParams *_this, float value)
MRC_API const MR_BendTextAlongCurveParams * MR_BendTextAlongCurveParams_OffsetPtr(const MR_BendTextAlongCurveParams *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 MR_expected_MR_Mesh_std_string * MR_bendTextAlongCurve_std_function_MR_CurvePoint_func_from_float(const MR_std_function_MR_CurvePoint_from_float *curve, const MR_BendTextAlongCurveParams *params)
MRC_API float * MR_BendTextAlongCurveParams_GetMutable_surfaceOffset(MR_BendTextAlongCurveParams *_this)
MRC_API MR_TextMeshAlignParams * MR_TextMeshAlignParams_AssignFromAnother(MR_TextMeshAlignParams *_this, MR_PassBy _other_pass_by, MR_TextMeshAlignParams *_other)
MRC_API const float * MR_TextMeshAlignParams_Get_MaxGeneratedFontHeight(void)
MRC_API float * MR_TextMeshAlignParams_GetMutable_textMaximumMovement(MR_TextMeshAlignParams *_this)
MRC_API MR_Vector3f * MR_TextMeshAlignParams_GetMutable_direction(MR_TextMeshAlignParams *_this)
MRC_API const MR_Vector2f * MR_TextMeshAlignParams_Get_pivotPoint(const MR_TextMeshAlignParams *_this)
MRC_API const MR_std_string * MR_TextMeshAlignParams_Get_text(const MR_TextMeshAlignParams *_this)
MRC_API MR_expected_MR_Mesh_std_string * MR_bendTextAlongCurve_std_vector_MR_CurvePoint(const MR_std_vector_MR_CurvePoint *curve, const MR_BendTextAlongCurveParams *params)
MRC_API void MR_TextMeshAlignParams_Set_fontBasedSizeCalc(MR_TextMeshAlignParams *_this, bool value)
MRC_API MR_SymbolMeshParams * MR_BendTextAlongCurveParams_GetMutable_symbolMesh(MR_BendTextAlongCurveParams *_this)
MRC_API float * MR_BendTextAlongCurveParams_GetMutable_fontHeight(MR_BendTextAlongCurveParams *_this)
MRC_API void MR_BendTextAlongCurveParams_Set_stretch(MR_BendTextAlongCurveParams *_this, bool value)
MRC_API const float * MR_TextMeshAlignParams_Get_surfaceOffset(const MR_TextMeshAlignParams *_this)
MRC_API MR_Vector2f * MR_TextMeshAlignParams_GetMutable_pivotPoint(MR_TextMeshAlignParams *_this)
MRC_API MR_Vector2f * MR_TextMeshAlignParams_GetMutable_symbolsDistanceAdditionalOffset(MR_TextMeshAlignParams *_this)
MRC_API const float * MR_BendTextAlongCurveParams_Get_surfaceOffset(const MR_BendTextAlongCurveParams *_this)
MRC_API const MR_SymbolMeshParams * MR_BendTextAlongCurveParams_Get_symbolMesh(const MR_BendTextAlongCurveParams *_this)
MRC_API MR_BendTextAlongCurveParams * MR_BendTextAlongCurveParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_BendTextAlongCurveParams *_other)
struct MR_BendTextAlongCurveParams MR_BendTextAlongCurveParams
Definition MRAlignTextToMesh.h:36
MRC_API const MR_Vector3f *const * MR_TextMeshAlignParams_Get_textNormal(const MR_TextMeshAlignParams *_this)
MRC_API void MR_TextMeshAlignParams_Set_pathToFontFile(MR_TextMeshAlignParams *_this, const char *value, const char *value_end)
MRC_API void MR_TextMeshAlignParams_Set_fontHeight(MR_TextMeshAlignParams *_this, float value)
MRC_API MR_BendTextAlongCurveParams * MR_BendTextAlongCurveParams_DefaultConstruct(void)
MRC_API const MR_Vector3f ** MR_TextMeshAlignParams_GetMutable_textNormal(MR_TextMeshAlignParams *_this)
MRC_API void MR_TextMeshAlignParams_Set_textNormal(MR_TextMeshAlignParams *_this, const MR_Vector3f *value)
MRC_API void MR_BendTextAlongCurveParams_Set_symbolMesh(MR_BendTextAlongCurveParams *_this, MR_PassBy value_pass_by, MR_SymbolMeshParams *value)
MRC_API const float * MR_TextMeshAlignParams_Get_fontHeight(const MR_TextMeshAlignParams *_this)
MRC_API const float * MR_BendTextAlongCurveParams_Get_fontHeight(const MR_BendTextAlongCurveParams *_this)
MRC_API void MR_BendTextAlongCurveParams_Set_pivotCurveTime(MR_BendTextAlongCurveParams *_this, float value)
MRC_API const MR_MeshTriPoint * MR_TextMeshAlignParams_Get_startPoint(const MR_TextMeshAlignParams *_this)
MRC_API const MR_Vector2f * MR_BendTextAlongCurveParams_Get_pivotBoxPoint(const MR_BendTextAlongCurveParams *_this)
MRC_API const bool * MR_TextMeshAlignParams_Get_fontBasedSizeCalc(const MR_TextMeshAlignParams *_this)
MRC_API const bool * MR_BendTextAlongCurveParams_Get_fontBasedSizeCalc(const MR_BendTextAlongCurveParams *_this)
MRC_API bool * MR_BendTextAlongCurveParams_GetMutable_fontBasedSizeCalc(MR_BendTextAlongCurveParams *_this)
MRC_API MR_MeshTriPoint * MR_TextMeshAlignParams_GetMutable_startPoint(MR_TextMeshAlignParams *_this)
MRC_API float * MR_TextMeshAlignParams_GetMutable_symbolsThicknessOffsetModifier(MR_TextMeshAlignParams *_this)
MRC_API MR_BendTextAlongCurveParams * MR_BendTextAlongCurveParams_OffsetMutablePtr(MR_BendTextAlongCurveParams *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 MR_AlignType * MR_TextMeshAlignParams_GetMutable_align(MR_TextMeshAlignParams *_this)
MRC_API MR_TextMeshAlignParams * MR_TextMeshAlignParams_OffsetMutablePtr(MR_TextMeshAlignParams *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 MR_BendTextAlongCurveParams * MR_BendTextAlongCurveParams_AssignFromAnother(MR_BendTextAlongCurveParams *_this, MR_PassBy _other_pass_by, MR_BendTextAlongCurveParams *_other)
MRC_API void MR_BendTextAlongCurveParams_Destroy(const MR_BendTextAlongCurveParams *_this)
Destroys a heap-allocated instance of MR_BendTextAlongCurveParams. Does nothing if the pointer is nul...
MRC_API void MR_TextMeshAlignParams_Set_text(MR_TextMeshAlignParams *_this, const char *value, const char *value_end)
MRC_API float * MR_BendTextAlongCurveParams_GetMutable_pivotCurveTime(MR_BendTextAlongCurveParams *_this)
MRC_API void MR_BendTextAlongCurveParams_Set_pivotBoxPoint(MR_BendTextAlongCurveParams *_this, MR_Vector2f value)
MRC_API void MR_TextMeshAlignParams_Set_pivotPoint(MR_TextMeshAlignParams *_this, MR_Vector2f value)
MRC_API float * MR_TextMeshAlignParams_GetMutable_surfaceOffset(MR_TextMeshAlignParams *_this)
MRC_API void MR_BendTextAlongCurveParams_DestroyArray(const MR_BendTextAlongCurveParams *_this)
Destroys a heap-allocated array of MR_BendTextAlongCurveParams. Does nothing if the pointer is null.
MRC_API const float * MR_TextMeshAlignParams_Get_symbolsThicknessOffsetModifier(const MR_TextMeshAlignParams *_this)
MRC_API void MR_TextMeshAlignParams_Set_align(MR_TextMeshAlignParams *_this, MR_AlignType value)
MRC_API void MR_TextMeshAlignParams_Set_startPoint(MR_TextMeshAlignParams *_this, const MR_MeshTriPoint *value)
MRC_API float * MR_TextMeshAlignParams_GetMutable_fontHeight(MR_TextMeshAlignParams *_this)
MRC_API const MR_Vector3f * MR_TextMeshAlignParams_Get_direction(const MR_TextMeshAlignParams *_this)
MRC_API MR_BendTextAlongCurveParams * MR_BendTextAlongCurveParams_DefaultConstructArray(size_t num_elems)
MRC_API void MR_TextMeshAlignParams_Set_textMaximumMovement(MR_TextMeshAlignParams *_this, float value)
struct MR_SymbolMeshParams MR_SymbolMeshParams
Definition MRAlignTextToMesh.h:18
MRC_API MR_TextMeshAlignParams * MR_TextMeshAlignParams_DefaultConstructArray(size_t num_elems)
MRC_API bool * MR_TextMeshAlignParams_GetMutable_fontBasedSizeCalc(MR_TextMeshAlignParams *_this)
MRC_API MR_TextMeshAlignParams * MR_TextMeshAlignParams_DefaultConstruct(void)
MRC_API int * MR_TextMeshAlignParams_GetMutable_fontDetalization(MR_TextMeshAlignParams *_this)
MRC_API MR_expected_MR_Mesh_std_string * MR_bendTextAlongSurfacePath(const MR_Mesh *mesh, const MR_MeshTriPoint *start, const MR_std_vector_MR_EdgePoint *path, const MR_MeshTriPoint *end, const MR_BendTextAlongCurveParams *params)
MRC_API const float * MR_TextMeshAlignParams_Get_textMaximumMovement(const MR_TextMeshAlignParams *_this)
MRC_API const MR_AlignType * MR_TextMeshAlignParams_Get_align(const MR_TextMeshAlignParams *_this)
MRC_API const MR_Vector2f * MR_TextMeshAlignParams_Get_symbolsDistanceAdditionalOffset(const MR_TextMeshAlignParams *_this)
MRC_API MR_Vector2f * MR_BendTextAlongCurveParams_GetMutable_pivotBoxPoint(MR_BendTextAlongCurveParams *_this)
MRC_API const bool * MR_BendTextAlongCurveParams_Get_stretch(const MR_BendTextAlongCurveParams *_this)
MRC_API const MR_TextMeshAlignParams * MR_TextMeshAlignParams_OffsetPtr(const MR_TextMeshAlignParams *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_TextMeshAlignParams_Set_symbolsThicknessOffsetModifier(MR_TextMeshAlignParams *_this, float value)
MRC_API MR_std_filesystem_path * MR_TextMeshAlignParams_GetMutable_pathToFontFile(MR_TextMeshAlignParams *_this)
MRC_API const MR_SymbolMeshParams * MR_TextMeshAlignParams_UpcastTo_MR_SymbolMeshParams(const MR_TextMeshAlignParams *object)
MRC_API MR_std_string * MR_TextMeshAlignParams_GetMutable_text(MR_TextMeshAlignParams *_this)
MRC_API const int * MR_TextMeshAlignParams_Get_fontDetalization(const MR_TextMeshAlignParams *_this)
struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
Definition MRCtm.h:24
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
struct MR_std_string MR_std_string
Definition MRCtm.h:32
struct MR_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint
Definition MREdgePaths.h:27
struct MR_std_filesystem_path MR_std_filesystem_path
Definition MRPly.h:20
MR_AlignType
Definition MRSymbolMesh.h:21
MR_PassBy
Definition common.h:23
#define MRC_API
Definition exports.h:11
struct MR_std_vector_MR_CurvePoint MR_std_vector_MR_CurvePoint
Definition std_vector_MR_CurvePoint.h:18
Definition MRVector2.h:45
Definition MRVector3.h:52