forked from 1b-agent/opencadstudio-upstream
fix(annotation): apply object context scaling
This commit is contained in:
1 parent
c4c673336c
commit
5909540ebf
4 files changed
+103
-9
No files matched your search
@@ -361,6 +361,20 @@ pub(crate) fn tessellate_entity(
|
||||
let e = contextual.as_ref();
|
||||
let h = e.common().handle;
|
||||
let sel = selected.contains(&h);
|
||||
// Per-object annotation contexts store each representation relative to the
|
||||
// native/default scale. Resolve that ratio once before TEXT/MTEXT,
|
||||
// DIMENSION, and MULTILEADER reach their independent tessellation paths.
|
||||
let anno_scale = if matches!(
|
||||
e,
|
||||
EntityType::Text(_)
|
||||
| EntityType::MText(_)
|
||||
| EntityType::Dimension(_)
|
||||
| EntityType::MultiLeader(_)
|
||||
) {
|
||||
crate::scene::annotative::effective_annotation_scale(document, e, anno_scale)
|
||||
} else {
|
||||
anno_scale
|
||||
};
|
||||
|
||||
// Frustum + LOD cull for non-Insert, non-Viewport entities. Insert is
|
||||
// handled separately (its WCS bbox depends on the block defn AABB ×
|
||||
|
||||
@@ -156,11 +156,8 @@ pub fn tessellate(
|
||||
// oversized text). Annotative-ness is resolved centrally from the entity's
|
||||
// per-object context, legacy XDATA, or annotative style (see
|
||||
// `scene::annotative::is_annotative`) so the bake and the panel agree.
|
||||
let anno_scale = if crate::scene::annotative::is_annotative(document, entity) {
|
||||
anno_scale
|
||||
} else {
|
||||
1.0
|
||||
};
|
||||
let anno_scale =
|
||||
crate::scene::annotative::effective_annotation_scale(document, entity, anno_scale);
|
||||
|
||||
// A HATCH is drawn as a fill by the hatch pipeline and highlighted via a
|
||||
// fill tint when selected (issue #71), so it carries no boundary outline in
|
||||
|
||||
Reference in new issue
Block a user