insightdock::charts::ChartExporter::encode

Encode a const chart without modifying it.

Synopsis

Declared in <insightdock/export.h>
static
ChartResult<std::vector<uint8_t>>
encode(
    Chart const& chart,
    ExportOptions const& opts = {});

Description

Standard exceptions during drawing/encoding become EncodeFailure; raster render/clone exceptions become RenderFailure. File I/O exceptions in save() become BadPath. These functions are not noexcept: non-standard exceptions from custom code propagate, and allocation/path preparation outside the guarded operations may throw. Strict vector output returns VectorUnsupported when draw() declines the target.

Return Value

Result of a chart export operation — either a value or a ChartError.

Parameters

Name Description
chart Abstract base for all chart types.
opts Options controlling render quality and output format.

Created with MrDocs