cadcraft/crates/render/tests
codyvogt 62fb5ae79a
Attributes keep Verify, Preset and Lock position (stacked on #854) (#876)
* Multiline attributes: read, draw and save their text

A multiline attribute (DXF attribute type 2, or 4 for a definition) has its
text as embedded MTEXT after its own groups (`101 Embedded Object`); its own
group 1 is empty. CADCraft read only the own groups, so the attribute drew
nothing, and a save wrote it back empty: its text was lost.

- `Attrib::multiline` keeps the multiline text; `text.value` holds its plain
  text, which ATTEDIT and the other value editors change; an edited value
  replaces the contents (`Attrib::multiline_text`).
- DXF read: ATTRIB and ATTDEF split at the marker; the MTEXT parsing is
  shared with MTEXT entities (`mtext_from`).
- Drawn as multiline text; ZOOM Extents counts it.
- DXF write (2007 and later; earlier versions get one line): attribute type,
  alignment point and the embedded MTEXT, only what differs from unrotated
  text, as AutoCAD writes it.
- INSERT and ATTSYNC give references the definition's multiline text placed
  with them; MOVE/ROTATE/SCALE, Properties rotation and scale, annotative
  scaling and FLATTEN carry it.
- Tests: synthetic multiline ATTDEF and ATTRIB (read, drawn, saved, edited,
  pre-2007 save, damaged embedded groups); engine INSERT, MOVE, ATTEDIT and
  ATTSYNC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Multiline attributes: read MTEXT direction from its own groups (#667, as #834 does)

#834 moves these lines' fix into the MTEXT reader; the same fix in the shared
mtext_from keeps the two compatible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Attributes keep Verify, Preset and Lock position

ATTDEF/ATTRIB flags 4 (verify) and 8 (preset) and Lock position (group 280
after the tag, DXF 2007 and later) were dropped on save. Without Lock
position AutoCAD lets an attribute be dragged out of its reference, and its
dynamic block actions no longer carry it. A reference's attributes take Lock
position from their definitions, as AutoCAD saves them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Cody Vogt <18035288+codyvogt@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-13 05:56:05 -04:00
..
aci7_display.rs Only colour 7 flips with the background (fixes #272) (#285) 2026-10-10 16:11:24 -04:00
annotative_viewport.rs Annotative scaling: scale list, CANNOSCALE, OBJECTSCALE, ANNOALLVISIBLE (part of #468) (#486) 2026-10-11 11:42:13 -04:00
dim_angular_centre.rs Dimension edits: DIMEDIT Oblique/New/Rotate/Home, DIMJOGGED, DIMJOGLINE, DIMBREAK, DIMINSPECT (part of #507) (#522) 2026-10-11 12:10:38 -04:00
dim_post_tolerance.rs Dimension edits: DIMEDIT Oblique/New/Rotate/Home, DIMJOGGED, DIMJOGLINE, DIMBREAK, DIMINSPECT (part of #507) (#522) 2026-10-11 12:10:38 -04:00
dim_text_format.rs Dimension edits: DIMEDIT Oblique/New/Rotate/Home, DIMJOGGED, DIMJOGLINE, DIMBREAK, DIMINSPECT (part of #507) (#522) 2026-10-11 12:10:38 -04:00
hatch_fill.rs Hatch: pick the pattern from swatches instead of typing its name (fixes #669) (#679) 2026-10-12 03:21:49 -04:00
linetype_text.rs Draw the text of complex linetypes along the line (fixes #312) (#316) 2026-10-10 16:11:52 -04:00
lwdefault.rs Default lineweight follows LWDEFAULT (fixes #292) (#295) 2026-10-10 16:10:56 -04:00
plot_line_styles.rs Plot styles: apply line end, join and fill styles (part of #564) (#566) 2026-10-11 13:13:32 -04:00
plot_styles.rs Plot styles: named styles (STB), PLOTSTYLE, STYLESMANAGER and table files (part of #410) (#418) 2026-10-10 19:21:24 -04:00
point_style.rs Points draw with the point style (PDMODE/PDSIZE) (fixes #261) (#265) 2026-10-10 15:33:43 -04:00
psltscale.rs Viewports: polygonal, object and clipped viewports, VPCLIP, MVIEW ON/OFF/Lock/Restore (part of #453) (#458) 2026-10-11 11:35:46 -04:00
raster_points.rs Draw raster points as a filled path so debug builds don't panic (#271) 2026-10-10 15:33:25 -04:00
render_props.rs Attributes keep Verify, Preset and Lock position (stacked on #854) (#876) 2026-10-13 05:56:05 -04:00
viewport_frozen_layer.rs Viewports: polygonal, object and clipped viewports, VPCLIP, MVIEW ON/OFF/Lock/Restore (part of #453) (#458) 2026-10-11 11:35:46 -04:00
wide_pline_linetype.rs Wide polylines are drawn with their linetype (fixes #293) (#309) 2026-10-10 16:11:30 -04:00
wipeout_mask.rs Wipeouts mask what is drawn before them; WIPEOUTFRAME controls the frame (fixes #291) (#308) 2026-10-10 16:11:35 -04:00