MTEXT: Height, Justify, Line spacing, Rotation, Style, Width, Columns (part of #408) (#415)

The options at MTEXT's "Specify opposite corner" prompt printed "not
available yet". Each now asks its question and returns to the corner
prompt: Height (also sets TEXTSIZE), Justify (TL..BR, the insertion point
is the box's attachment point), Line spacing (At least/Exactly, then a
factor such as 1.5x or a distance), Rotation (picked, or typed through the
drawing's angle settings; the box turns with it), Style (? lists them),
Width (replaces the opposite corner) and Columns (No; Dynamic and Static
say columns are not available yet). MText stores the line spacing style
(DXF group 73) so Exactly round-trips.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valentin Klein
2026-10-10 19:19:53 -04:00
committed by GitHub
co-authored by Claude Opus 5.5
parent ee34f423cc
commit 3ffe1ca2af
14 changed files with 464 additions and 28 deletions
+2
View File
@@ -485,6 +485,7 @@ fn mleader_kind(s: &Session, pts: &[Vec2], text: &str, landing: bool) -> Option<
style: st.text_style.clone(),
contents: text.replace('\n', "\\P"),
line_spacing: 1.0,
line_spacing_exact: false,
}),
style: st.name.clone(),
arrow_size: st.arrow_size * k,
@@ -525,6 +526,7 @@ fn run_leader(s: &mut Session, p: &Value) -> Result<Value> {
style: "Standard".into(),
contents: t.into(),
line_spacing: 1.0,
line_spacing_exact: false,
}))?
.hex(),
);