|
MUSX Document Model
|
Converts a Shape Designer definition into an SVG buffer. More...
#include <SvgConvert.h>
Classes | |
| struct | ExternalGraphicInfo |
| Metadata describing an external graphic instruction. More... | |
| struct | ExternalGraphicPayload |
| Payload data for external graphics. More... | |
| struct | GlyphMetrics |
| Metrics for sizing SVG text bounds. More... | |
Public Types | |
| using | GlyphMetricsFn = std::function< std::optional< GlyphMetrics >(const dom::FontInfo &, std::u32string_view)> |
| Optional callback that returns glyph metrics in EVPU units. | |
| using | ExternalGraphicFn = std::function< std::optional< ExternalGraphicPayload >(const ExternalGraphicInfo &)> |
| Optional callback that resolves external graphics to a MIME type and byte buffer. | |
Static Public Member Functions | |
| static std::string | toSvg (const dom::others::ShapeDef &shape, GlyphMetricsFn glyphMetrics=nullptr, ExternalGraphicFn externalGraphicResolver=nullptr) |
| Convert a ShapeDef into an SVG string buffer. | |
Converts a Shape Designer definition into an SVG buffer.
| using musx::util::SvgConvert::GlyphMetricsFn = std::function<std::optional<GlyphMetrics>(const dom::FontInfo&, std::u32string_view)> |
Optional callback that returns glyph metrics in EVPU units.
|
static |
Convert a ShapeDef into an SVG string buffer.
| shape | The shape definition to convert. |
| glyphMetrics | Optional callback that returns glyph metrics in EVPU units. |
| externalGraphicResolver | Optional callback that resolves external graphics to bytes and MIME types. |