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:
@@ -598,6 +598,7 @@ impl ExportOrchestrator {
|
||||
// ── First call: render the frame to the GPU output texture ────────
|
||||
let w = state.width;
|
||||
let h = state.height;
|
||||
let fit = state.settings.fit;
|
||||
|
||||
if state.gpu_resources.is_none() {
|
||||
state.gpu_resources = Some(video_exporter::ExportGpuResources::new(device, w, h));
|
||||
@@ -632,8 +633,7 @@ impl ExportOrchestrator {
|
||||
state.settings.allow_transparency,
|
||||
raster_store,
|
||||
true, // image export composites on the shared device
|
||||
// Image export renders at the document's own size, so the fit transform is identity.
|
||||
lightningbeam_core::export::ExportFitMode::Letterbox,
|
||||
fit,
|
||||
)?;
|
||||
queue.submit(Some(encoder.finish()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user