Symbols: an instance that only moves holds art its 9-slice guides move

A symbol whose natural size is not 20 x 20 is drawn through its 9-slice
guides by an instance that only moves, so art the guides move can draw
outside the art box moved by the instance. The visual box took that
moved art box alone, and the renderer culled the instance when only the
moved art was in view. The visual box now measures such an instance as
it does a scaled one.
This commit is contained in:
dotCooCoo
2026-11-10 23:07:27 -08:00
parent 9f44e37274
commit badcf3f63f
2 changed files with 27 additions and 1 deletions
+4 -1
View File
@@ -373,7 +373,10 @@ impl Node {
NodeKind::SymbolInstance { symbol, xf } => {
let b = match symbols.and_then(|s| Some((s, s.art(symbol)?))) {
Some((s, art)) if !s.art_strokes() => xf.transform_rect_bbox(art.geometric),
Some((_, art)) if moves_only(*xf) => xf.transform_rect_bbox(art.visual),
// A symbol drawn at other than its natural size goes through its 9-slice guides.
Some((s, art)) if moves_only(*xf) && s.document().symbol_slice_map_of(symbol, art.geometric, *xf).is_none() => {
xf.transform_rect_bbox(art.visual)
}
Some((s, art)) => {
let placed = xf.transform_rect_bbox(art.geometric);
match s.placed_visual(symbol, *xf).or_else(|| s.sliced_visual(symbol, *xf)) {