Encode a const chart without modifying it.
<insightdock/export.h>
static
ChartResult<std::vector<uint8_t>>
encode(
Chart const& chart,
ExportOptions const& opts = {});
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.
ChartError.
| Name | Description |
|---|---|
| chart | Abstract base for all chart types. |
| opts | Options controlling render quality and output format. |