Skip to content

Instance model labels, fanout grid and summaries, PNG export - #48

Merged
xtofalex merged 4 commits into
mainfrom
view-options-png-export
Nov 14, 2026
Merged

xtofalex merged 4 commits into
mainfrom
view-options-png-export

Conversation

@xtofalex

Copy link
Copy Markdown
Contributor

What

Cell model on instances. New instance_label view option: name (the default), model (cell model under the box, no name) or both. The model row is part of the layout footprint and a routing obstacle. It appears on screen, in SVG and in PNG.

Fanout layout

  • sink_rows (default 8): a column with more sink-only boxes than this wraps into balanced columns.
  • max_sinks (default 32) and group_by (model | hierarchy | role): a net draws its first sinks and gathers the rest into stacked summary boxes ("FDRE ×28"). Clicking one shows its sinks.
  • Never gathered: the driver, a sink drawn for another reason, an expanded group, a group of one.
  • Logic is in SchematicLayout::planFanout() and layeredPlacement(..., maxSinkRows).

PNG export with a scale factor

  • Interfaces: native --png out.png --scale 3, the export_png push answered by png_exported, naja-schematic render --png --scale, and naja_schematic.export_png().
  • How it works: RasterPainter rasterizes the same ImGui drawing in software at S×, so text is sharp. PngWriter is a dependency-free encoder.

Where the options are set: the View menu (Instance Labels, Fanout), a view_options host push, CLI flags on the native app, the server and render (--instance-label, --sink-rows, --max-sinks, --group-by), and view_options= on ViewerSession, ViewerServer, show() and the export functions.

Behavior changes

  • With the defaults, nets with more than 8 sinks wrap into a grid and nets with more than 32 are summarized. --sink-rows 0 --max-sinks 0 gives the old layout.
  • The headless view now acts as a texture-capable backend (dynamic font atlas), so text is measured as in the GUI. SVG text widths can shift slightly.

Tests

  • C++: tests/FanoutTest.cpp and tests/RasterTest.cpp are new; all 286 tests pass. Provider tests pass, and the render-only and WASM builds compile.
  • Python: the new render tests cover PNG, labels and a wide-fanout CLI case on wide_fanout.v. All 238 pass with the renderer required. test_notebook.py was not run.
  • reuse lint is clean.

- view_options (View menu, host push, CLI flags, Python view_options=):
  instance_label name|model|both draws the cell model under the box;
  sink_rows wraps a column of sinks into a grid; max_sinks + group_by
  (model|hierarchy|role) gather a wide net's remaining sinks into summary
  boxes that expand when clicked. Drivers are always drawn.
- PNG export with a scale factor: native --png/--scale, export_png push,
  naja-schematic render --png --scale, naja_schematic.export_png().
  Software rasterizer of the ImGui drawing plus a dependency-free PNG
  encoder; the headless view now uses the dynamic font atlas.
The default encoding is cp1252 on Windows, which garbles the summary
boxes' multiplication sign.
setup-python v6, upload-artifact v6, download-artifact v7 (the first
Node 24 majors; artifacts are used by name/pattern only, which their
breaking changes don't touch), setup-emsdk v16 at its new home
(emscripten-core). msvc-dev-cmd has no Node 24 release: the MSVC
environment is now set up inline from vcvarsall.bat.
ubuntu-latest moves to Ubuntu 26.04 from 2026-10-19. The native Linux
build and the aarch64 runner were already on 24.04; now every Linux job
is, so the wheels and tests don't change OS unannounced.
@xtofalex
xtofalex merged commit a1053d0 into main Nov 14, 2026
27 checks passed
@xtofalex
xtofalex deleted the view-options-png-export branch November 14, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant