export: add Fit mode to image export too
ImageExportSettings gains `fit: ExportFitMode` (default Letterbox) + a "Fit" dropdown in advanced image settings; the image render path uses it instead of the hardcoded Letterbox. Image export supports a resolution override, so the mode matters when the override aspect differs from the document.
This commit is contained in:
@@ -524,11 +524,14 @@ pub struct ImageExportSettings {
|
||||
/// When false, the image is composited onto an opaque background before encoding.
|
||||
/// Only meaningful for formats that support alpha (PNG, WebP).
|
||||
pub allow_transparency: bool,
|
||||
/// How the document is fit into the output frame when aspect ratios differ (default Letterbox).
|
||||
#[serde(default)]
|
||||
pub fit: ExportFitMode,
|
||||
}
|
||||
|
||||
impl Default for ImageExportSettings {
|
||||
fn default() -> Self {
|
||||
Self { format: ImageFormat::Png, time: 0.0, width: None, height: None, quality: 90, allow_transparency: false }
|
||||
Self { format: ImageFormat::Png, time: 0.0, width: None, height: None, quality: 90, allow_transparency: false, fit: ExportFitMode::Letterbox }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user