From 46710e476caa1f6c2028ba75f03fbd291207ce22 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 15:03:18 -0800 Subject: [PATCH] Export: HP-GL Options measures the art's bounds the way the export does main's art_page takes the rule for art left out of the bounds. The HP-GL dialog check and its automatic pen list now pass the export's rule, so they leave out art a plot draws nothing for. --- crates/engine/src/cmd/fileio/hpgl.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/fileio/hpgl.rs b/crates/engine/src/cmd/fileio/hpgl.rs index c2051dc1db..137915f8ec 100644 --- a/crates/engine/src/cmd/fileio/hpgl.rs +++ b/crates/engine/src/cmd/fileio/hpgl.rs @@ -127,12 +127,13 @@ pub fn automatic_pens(doc: &Document, p: &Value) -> Vec { /// Run `f` on the document an export of `doc` with `p` plots and the regions of its plots: with /// `useArtboards: false`, a copy of `doc` whose one artboard is the bounds of the visible art. -/// Like the export, it leaves out an opacity-mask or symbol editing layer. +/// Like the export, it leaves out an opacity-mask or symbol editing layer, and measures the bounds +/// without the art a plot draws nothing for. fn with_plotted(doc: &Document, p: &Value, f: impl FnOnce(&Document, Vec) -> Result) -> Result { let doc = &*doc.without_edit_modes(); let use_artboards = super::encode::use_artboards(C, p)?; if use_artboards == Some(false) - && let Some((art, q)) = super::encode::art_page(C, doc, p)? + && let Some((art, q)) = super::encode::art_page(C, doc, p, |n| vectorcraft_cad::hpgl::write::plots_nothing(doc, n))? { let (_, regions) = boards(&art, &q, None)?; return f(&art, regions);