31#include "musx/dom/Fundamentals.h"
32#include "musx/dom/MusxInstance.h"
54 std::vector<std::uint8_t>
bytes;
93 static std::string
toSvg(
const dom::others::ShapeDef& shape,
Represents the default font settings for a particular element type.
Definition CommonClasses.h:66
Converts a Shape Designer definition into an SVG buffer.
Definition SvgConvert.h:47
std::function< std::optional< GlyphMetrics >(const dom::FontInfo &, std::u32string_view)> GlyphMetricsFn
Optional callback that returns glyph metrics in EVPU units.
Definition SvgConvert.h:80
std::function< std::optional< ExternalGraphicPayload >(const ExternalGraphicInfo &)> ExternalGraphicFn
Optional callback that resolves external graphics to a MIME type and byte buffer.
Definition SvgConvert.h:83
static std::string toSvg(const dom::others::ShapeDef &shape, GlyphMetricsFn glyphMetrics=nullptr, ExternalGraphicFn externalGraphicResolver=nullptr)
Convert a ShapeDef into an SVG string buffer.
Definition SvgConvert.cpp:663
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:57
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
object model for musx file (enigmaxml)
Definition BaseClasses.h:36
Metadata describing an external graphic instruction.
Definition SvgConvert.h:60
dom::Evpu width
Width of the external graphic in EVPU units.
Definition SvgConvert.h:61
dom::Cmper cmper
Cmper matching dom::others::PageGraphicAssign::graphicCmper.
Definition SvgConvert.h:63
dom::Evpu height
Height of the external graphic in EVPU units.
Definition SvgConvert.h:62
Payload data for external graphics.
Definition SvgConvert.h:52
std::vector< std::uint8_t > bytes
Raw graphic bytes (caller-provided).
Definition SvgConvert.h:54
std::string mimeType
MIME type for the graphic data.
Definition SvgConvert.h:53
Metrics for sizing SVG text bounds.
Definition SvgConvert.h:68
double descent
The descent below the baseline in EVPU units (positive value).
Definition SvgConvert.h:74
double advance
The advance width of the text in EVPU units.
Definition SvgConvert.h:70
double ascent
The ascent above the baseline in EVPU units.
Definition SvgConvert.h:72