24#ifndef OCCTL_HPP_TEXT_HPP
25#define OCCTL_HPP_TEXT_HPP
40inline ::occtl_axis2_placement_t default_ax2() noexcept
42 return {{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}};
65inline ::occtl_text_info_t to_c_info(
const std::string& theText,
80 theLayout = OCCTL_TEXT_LAYOUT_OPTIONS_INIT;
83 anInfo.
p_next = &theLayout;
110 const std::string& theText,
128 const std::string& theText,
RAII handle for a topology graph. Mirrors occtl_graph_t.
Definition topo.hpp:1444
::occtl_graph_t * get() const noexcept
Borrows-it pointer to the underlying C handle, for direct ABI calls.
Definition topo.hpp:1494
Session-local identity of a graph node. Mirrors occtl_node_id_t.
Definition topo.hpp:52
C++ veneer for the core module.
void check(const ::occtl_status_t theStatus)
Throw on non-OK; otherwise a no-op.
Definition core.hpp:85
OCCT-Light: text-to-shape module public API.
struct occtl_text_metrics occtl_text_metrics_t
occtl_status_t occtl_text_make_wires(occtl_graph_t *graph, const occtl_text_info_t *info, occtl_node_id_t *out_compound)
enum occtl_text_font_aspect occtl_text_font_aspect_t
occtl_status_t occtl_text_make_faces(occtl_graph_t *graph, const occtl_text_info_t *info, occtl_node_id_t *out_compound)
@ OCCTL_TEXT_HALIGN_LEFT
Definition occtl_text.h:64
@ OCCTL_TEXT_VALIGN_BASELINE
Definition occtl_text.h:76
occtl_status_t occtl_text_measure(const occtl_text_info_t *info, occtl_text_metrics_t *out_metrics)
enum occtl_text_valign occtl_text_valign_t
enum occtl_text_halign occtl_text_halign_t
@ OCCTL_TEXT_FONT_ASPECT_REGULAR
Definition occtl_text.h:52
#define OCCTL_NODE_ID_INVALID
Definition occtl_topo_types.h:138
Optional layout/font knobs for make_faces and make_wires.
Definition text.hpp:48
double height
Glyph cap height in model units; strictly positive.
Definition text.hpp:53
bool word_wrapping
Avoid breaking words when wrapping.
Definition text.hpp:57
::occtl_axis2_placement_t placement
Baseline frame; defaults to XOY.
Definition text.hpp:49
std::string font_path
Absolute path to a .ttf/.otf file.
Definition text.hpp:51
double wrapping_width
Maximum line width; 0 disables wrapping.
Definition text.hpp:56
std::string font_family
Family name; ignored when font_path is set.
Definition text.hpp:50
Definition occtl_geom.h:128
Definition occtl_topo_types.h:50
Definition occtl_text.h:97
const void * p_next
Definition occtl_text.h:99
const char * font_path
Definition occtl_text.h:105
occtl_text_font_aspect_t font_aspect
Definition occtl_text.h:106
occtl_text_valign_t vertical_align
Definition occtl_text.h:109
occtl_text_halign_t horizontal_align
Definition occtl_text.h:108
double height
Definition occtl_text.h:107
occtl_axis2_placement_t placement
Definition occtl_text.h:100
const char * utf8_text
Definition occtl_text.h:101
const char * font_family
Definition occtl_text.h:103
Definition occtl_text.h:119
int32_t word_wrapping
Definition occtl_text.h:123
double wrapping_width
Definition occtl_text.h:122
Definition occtl_text.h:135
NodeId make_faces(Graph &theGraph, const std::string &theText, const TextFacesOptions &theOpts)
Builds a Compound of planar text faces and returns its NodeId. Throws occtl::Error on failure.
Definition text.hpp:109
NodeId make_wires(Graph &theGraph, const std::string &theText, const TextFacesOptions &theOpts)
Builds a Compound of glyph outline wires and returns its NodeId. Throws occtl::Error on failure.
Definition text.hpp:127
TextMetrics measure(const std::string &theText, const TextFacesOptions &theOpts)
Measures formatted text without creating graph topology. Throws occtl::Error on failure.
Definition text.hpp:94
C++ veneer for the topo module.