Commit Graph
6 Commits
Author SHA1 Message Date
PanosandClaude Opus 5 8e09bd8463 fix(plot): follow the fixture's page-setup conventions
A drawing saved by a commercial CAD application (tests/fixtures/plot,
provided by Panos: one 10 m line, three layouts) corrects several
assumptions of the previous commit:

- rotation is relative to the medium's own orientation: an unchanged sheet
  keeps the driver's exact medium (its PDF driver lists landscape media of
  its own, written with rotation 0; a system printer's portrait A3 plotted
  landscape carries 90); only a newly picked sheet is written as the
  catalogue's portrait medium
- the stored scale factor (DXF 147) is the ratio × 25.4 on millimetre page
  setups and the plain ratio on inch ones; the "use standard scale" bit
  stays clear for standard and custom scales and is set for fit-to-paper;
  a standard code is kept across a paper-unit conversion ("1:1" on an
  inch page setup over a millimetre paper space is 1 in = 25.4 units)
- layout plots take the same scale path as every other area, so a foreign
  layout's paper-space unit survives
- "plot with plot styles" / "display plot styles" round-trip as the
  dialog's checkboxes, independent of a style table being named
- layout limits place the sheet at minus its displayed margins, the way the
  source application does (the printable corner is the paper-space origin);
  the margin ↔ rotation mapping shared by the printable-area guide now
  turns the medium's top margin into the layout's left one at 90°

The fixture round-trips through the dialog with every stored field
unchanged; picking a new sheet on it writes the canonical form.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-17 18:04:38 +03:00
Christopher Overbeck 5424a19482 Track mixed paper and viewport dimension references 2026-09-15 16:00:11 -05:00
Christopher Overbeck 64ce0b2e8c Resolve viewport dimension features and preserve valid measurements on refresh 2026-09-15 14:53:45 -05:00
Christopher Overbeck 7f018ab0f1 Merge viewport creation fixes and current upstream into associations 2026-09-15 14:14:33 -05:00
Christopher OverbeckandClaude Fable 5.1 f2c9e90c34 Add a synthetic viewport-association fixture
A hand-written DXF small enough to read: one layout viewport at a 1:2
paper-per-model scale, one line, circle, arc, bulged lightweight
polyline, spline and block instance in model space, and one associative
aligned dimension per feature drawn on the sheet through the viewport.

Each association exercises a different part of the chain and feature
resolution: endpoints on a line, quadrants on a circle, endpoints on an
arc, an endpoint and a bulge segment on a polyline, a tangent-to-spline
reference (the 115448 shape), a viewport -> insert -> line chain through
a block instance, and an intersection with a second object chain. Every
association is marked trans_space, so all of them fail on the pre-PR3
resolver and all of them are expected to resolve now.

The expected values are checkable by hand: the viewport maps model
(x, y) to paper (150 + (x - 150)/2, 100 + (y - 150)/2), so a 100-unit
model length is 50 paper units and must still display as 100.

Verification tests come in the next pass; the fixture is committed now
so they have something to read.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-15 12:46:04 -05:00
Christopher Overbeck c93cc17592 Include bitmap images in PDF plots, preview, and printing
Include decoded IMAGE/OLE content in the shared PDF plotting path,
with clipping, transforms, transparency, draw order, and resource reuse.
Use named page content for export and printing.

Fixes #1266
2026-09-14 17:07:57 -05:00