//! Drawing a composition into a vector scene.
//!
//! The counterpart to [`raster`](super::raster) for the backends that emit
//! drawing commands rather than pixels. `PlotComposition::render` takes
//! `&mut dyn SceneBuilder`, so this is the same call the rasteriser makes —
//! which is why SVG and PDF need no GPU adapter, no wgpu and no encoder.
use HashMap;
use SceneBuilder;
use Canvas;
use compose;
use crate::;
/// Check the plot, compose it, and draw it into `scene`.
///
/// Everything a vector writer does before serialising; what differs is the
/// scene type and how it is turned into bytes.
///
/// # Errors
///
/// Returns `GgsqlError::WriterError` if the plot cannot be drawn by this
/// renderer, or if composing it fails.