From 15de88cf82c187635c1989e91bfa639a10304066 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 20:08:07 -0300 Subject: canim: a column of text as an experiment; the disassembly tied to the stack From the user. A scene may set its text in a column beside the panes a beat is about: col.beat names the panes and their rows, where the text is placed (beside, below, above, or on a drawing) and what it is level with; panes the beat leaves out fold to their title bars on a shelf, their changes struck there. Tried as two scenes beside the originals: the call followed down (column) and a bubble on sort's rings (column_sort). annotation = .tied names the word an instruction touched and draws a touch to its stack row; offsets count from the frame's base; rsp's pin travels with its amount before the stack follows; .whole keeps the full chain. carry = .arrow draws a value's way between memory and a register. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- anim/src/graph.zig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'anim/src/graph.zig') diff --git a/anim/src/graph.zig b/anim/src/graph.zig index 7066580..01b4ac7 100644 --- a/anim/src/graph.zig +++ b/anim/src/graph.zig @@ -1942,6 +1942,7 @@ fn drawPills(u: ui.Ui, v: Instant) void { } const o = u.faded(shows); const r: ui.Rect = .{ .x = x, .y = y, .w = n.w, .h = n.h }; + @import("ties.zig").anchor(u, .{ .block = n.start }, r); const base_y = rows.baseline(y); if (n.folded > 0) { pill(o, r, ui.rgb(theme.color.page), ui.rgb(theme.color.rule), theme.stroke.rule, true); @@ -2023,7 +2024,9 @@ pub const Blocks = struct { defer u.unclip(); const now = b.cursor.now(placed); const rule = theme.stroke.rule; - const room: [2]f32 = .{ box.w - 2 * rule, box.h - m.tag - rule }; + // Drawn larger (a column's drawing across both columns): laid out in its room at its own size, then scaled. + const z = placed.value(b.stage.zoom); + const room: [2]f32 = .{ (box.w - 2 * rule) / z, (box.h - m.tag - rule) / z }; const v = instant(f.scratch, now, b.form, room) orelse { _ = u.panel(box.w, box.h, "its blocks", .{ .focus = b.focus }); return; @@ -2033,8 +2036,11 @@ pub const Blocks = struct { const short = name[0 .. std.mem.lastIndexOfScalar(u8, name, '+') orelse name.len]; const title = if (std.mem.indexOfScalar(u8, full, '!')) |bang| u.print("the blocks of {s} \u{00b7} {s}", .{ short, full[0..bang] }) else u.print("the blocks of {s}", .{short}); _ = u.panel(box.w, box.h, title, .{ .focus = b.focus, .note = if (v.g.rings.len > 0) "its blocks \u{00b7} the visits so far \u{00b7} the path \u{00b7} the loops' turns" else "its blocks \u{00b7} the visits so far \u{00b7} the path" }); - u.clip(.{ .x = rule, .y = m.tag, .w = room[0], .h = room[1] }); - const o = u.moved(rule + v.at[0], m.tag + v.at[1]); + u.clip(.{ .x = rule, .y = m.tag, .w = room[0] * z, .h = room[1] * z }); + var big = u.moved(rule, m.tag); + big.at.xf = big.at.xf.mul(.scale(z, z)); + big.at.scale *= z; + const o = big.moved(v.at[0], v.at[1]); drawEdges(o, v); drawTurns(o, v); drawPills(o, v); -- cgit v1.3