forked from 1b-agent/opencadstudio-upstream
fix(mleader): read the attachment anchor from the annotation context
The horizontal attachment point was read from the entity-level field, which only exists from R2010 on; older records (R2007 and earlier) left it at the default and centre/right-attached leaders shifted. The annotation context carries the same value in every version, so anchor from there for both the render and the width-grip geometry. acadrust bump also brings: the R2007 MULTILEADER tail gating (leaders no longer render upside-down), the R2004-R2006 inline SAB payload read, the v1-SAT wireframe point_present decode (3D solids/regions land in place on R2000/R2004), and the XCLIPFRAME default of 2 so clip-frame borders draw on files whose header omits the variable. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
57357aaa12
commit
faa135a7a1
2 files changed
+6
-4
No files matched your search
@@ -361,7 +361,7 @@ fn text_box_geom(ml: &MultiLeader) -> ([f64; 2], [f64; 3]) {
|
||||
ctx.text_flow_direction,
|
||||
acadrust::entities::multileader::FlowDirectionType::Vertical
|
||||
);
|
||||
let h_anchor: f32 = match ml.text_attachment_point {
|
||||
let h_anchor: f32 = match ctx.text_attachment_point {
|
||||
acadrust::entities::multileader::TextAttachmentPointType::Left => 0.0,
|
||||
acadrust::entities::multileader::TextAttachmentPointType::Center => 0.5,
|
||||
acadrust::entities::multileader::TextAttachmentPointType::Right => 1.0,
|
||||
@@ -1673,7 +1673,9 @@ impl MultiLeaderTess for MultiLeader {
|
||||
use acadrust::entities::multileader::{
|
||||
TextAttachmentDirectionType, TextAttachmentPointType,
|
||||
};
|
||||
let h_anchor: f32 = match ml.text_attachment_point {
|
||||
// The context's attachment point exists in every DWG version;
|
||||
// the entity-level copy only exists from R2010 on.
|
||||
let h_anchor: f32 = match ctx.text_attachment_point {
|
||||
TextAttachmentPointType::Left => 0.0,
|
||||
TextAttachmentPointType::Center => 0.5,
|
||||
TextAttachmentPointType::Right => 1.0,
|
||||
|
||||
Reference in new issue
Block a user