#[derive(Debug, Clone)]
pub struct RenderConfig {
pub dpi: u32,
pub format: ImageFormat,
pub background: Background,
pub max_width: Option<u32>,
pub max_height: Option<u32>,
}
impl Default for RenderConfig {
fn default() -> Self {
Self {
dpi: 150,
format: ImageFormat::Png,
background: Background::White,
max_width: None,
max_height: None,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum ImageFormat {
Png,
Jpeg,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Background {
White,
Transparent,
}