forked from 1b-agent/opencadstudio-upstream
feat(mline): render multilines from their MLINESTYLE + complex linetypes
Multilines were drawn with a fixed ±scale/2 two-line guess in the entity colour, ignoring the MLINESTYLE entirely, so a drawing's custom style (per- element offsets, colours and linetypes) was lost — a red/yellow multiline rendered as a white box. - mline.rs: resolve the MLINESTYLE (by style_handle, then name) and build one parallel line per element from its offset x scale + justification shift. - tessellate.rs: special-case MLINE (like Leader) to emit one WireModel per element in the element's own colour, CPU-dashing every element through apply_along so the parallel lines stay in phase. - linetypes.rs: render a drawing's OWN complex linetypes (embedded text/shape), document definition first and the bundled .lin catalog only as a fallback, so a file-defined text linetype like PLYN shows its text. - Run the dash/glyph layout in a local frame (f64 origin subtracted, re-split to double-single after) so spacing stays precise at UTM coordinates, and pass tracking = 1.0 so embedded text keeps its letter spacing. Cargo.lock pins acadrust to the MLINE->MLINESTYLE handle-link reader fix. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
e85e2aeb78
commit
0e18b5bb33
6 files changed
+454
-75
No files matched your search
@@ -185,9 +185,12 @@ pub fn apply_along(
|
||||
&mut atlas,
|
||||
*tx_scale,
|
||||
fwd_angle,
|
||||
1.0, // width_factor
|
||||
0.0, // oblique
|
||||
// tracking = 1.0 applies the font's natural
|
||||
// letter_spacing; 0.0 zeroes it and cramps the glyphs
|
||||
// (every other text path passes 1.0).
|
||||
1.0,
|
||||
0.0,
|
||||
0.0,
|
||||
style,
|
||||
false,
|
||||
&resolved,
|
||||
|
||||
Reference in new issue
Block a user