diff options
Diffstat (limited to 'anim/tools/chart.py')
| -rw-r--r-- | anim/tools/chart.py | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/anim/tools/chart.py b/anim/tools/chart.py index 7cc0925..290c59e 100644 --- a/anim/tools/chart.py +++ b/anim/tools/chart.py @@ -39,27 +39,36 @@ def split(drawing, view, source, disasm, slots, backtrace=0): out["backtrace"] = (976, right + ph(17) + 12 + ph(slots) + 12, 880, ph(backtrace)) return out -# The words that are not panels (motion.WORDS): the clock (its count, ranged right at 1648, -# changes in a frame by design), the caption (its 1400 from the margin), and the minimap at -# the caption band's right end, secondary action. The caption's box starts under the clock's count -# and the run's step counter (912 to 934). -words = {"clock": (0, 888, 1656, 46), "caption": (0, 940, 1464, 140), "minimap": (1664, 912, 192, 108)} +# The words that are not panels (motion.WORDS): the clock (its count, ranged right at 1856, +# changes in a frame by design) and the caption (its 1400 from the margin). The caption's box +# starts under the clock's count and the run's step counter (912 to 934). +words = {"clock": (0, 888, 1920, 46), "caption": (0, 940, 1464, 140)} none, beside, subject = split(0, 0, 14, 17, 8, 4), split(152, 152, 8, 17, 8), split(296, 200, 10, 9, 6) # The `blocks` lens: the graph over the program column, the source alone under it; the disassembly # (its view) over the state column, seven rows, the registers and six words under it. blocks = {**subject, "view": (976, 48, 880, ph(7)), "source": (64, 356, 880, ph(20))} del blocks["disasm"] +# Each pane's minimap a region of its own (motion.strips), secondary action: the source's, the +# disassembly's, the stack's, and the view's where it is a dump (not the calls lens's backtrace, +# not the syscalls lens's log). +def strips(panes, view): + out = motion.strips(panes) + if not view and "view strip" in out: + del out["view strip"] + out["view"] = panes["view"] + return out motion.REGIONS.update({ - "fib": {**subject, **words}, - "sort": {**blocks, **words}, + "fib": {**strips(subject, False), **words}, + "sort": {**strips(blocks, True), **words}, # The band is the calls so far; the disassembly a descent. - "syscalls": {**beside, **words}, - "heap": {**subject, **words}, - "list": {**subject, **words}, - # The band's drawing is the backtrace, then the kernel's side. - "sqlite": {**subject, **words}, - "zoom": {**none, **words}, - "gallery": {**beside, **words}, + "syscalls": {**strips(beside, False), **words}, + "musl": {**strips(beside, False), **words}, + "heap": {**strips(subject, True), **words}, + "list": {**strips(subject, True), **words}, + # The band's drawing is the backtrace, then the kernel's side; its view a dump. + "sqlite": {**strips(subject, True), **words}, + "zoom": {**strips(none, False), **words}, + "gallery": {**strips(beside, True), **words}, }) # `cut`: the gallery is the catalogue's pages, cut from one to the next (scenes/gallery.zig: 3, 6, 9.6, 13, 16, # 19.8, 21 and 24 s), not a scene: a page's first frame changes everything at once by design. @@ -92,8 +101,8 @@ def shown(text): text = re.sub(r"\\(.)", r"\1", text.replace("\\n", "")) return len(text.replace("`", "")) -# A scene that opens on the map dives (scenes/list.zig: at 2.5 s, 150 f): the falling map passes under the -# caption, which does not change. Its frames are no caption's arrival or leaving. +# A scene that opens on the map dives (scenes/list.zig: at 2.5 s, 150 f): the map's columns go into their +# strips over the caption, which does not change. Its frames are no caption's arrival or leaving. DIVES = {"list": (150, 300)} _lint = motion.lint |
