pub struct RenderOptions {
pub theme: Theme,
pub font_family: Option<String>,
pub font_size: Option<f64>,
pub max_width: Option<f64>,
pub background: Option<String>,
}Expand description
Per-call rendering configuration passed to render_with_options and
try_render_with_options.
Use RenderOptions::default() to get a zero-configuration value and then
set individual fields as needed.
§Examples
use ariel_rs::{RenderOptions, theme::Theme};
let opts = RenderOptions {
theme: Theme::Dark,
font_family: Some("monospace".to_string()),
..RenderOptions::default()
};Fields§
§theme: ThemeThe colour theme to apply to the rendered diagram.
font_family: Option<String>Optional CSS font-family string (e.g. "sans-serif").
When None the renderer uses its built-in default.
Support for this field in individual renderers is planned for a future
release.
font_size: Option<f64>Optional base font size in points.
When None the renderer uses its built-in default.
Support for this field in individual renderers is planned for a future
release.
max_width: Option<f64>Optional maximum width of the output SVG in pixels.
When None the renderer uses its built-in default.
Support for this field in individual renderers is planned for a future
release.
background: Option<String>Optional background colour as a CSS colour string (e.g. "#ffffff").
When None the renderer uses the theme’s default background.
Support for this field in individual renderers is planned for a future
release.