Skip to content

web: save_image renders the script view - #11944

Draft
jorge-ferreira-pii wants to merge 6 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:issue11488-3-save-image-script-view
Draft

jorge-ferreira-pii wants to merge 6 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:issue11488-3-save-image-script-view

Conversation

@jorge-ferreira-pii

@jorge-ferreira-pii jorge-ferreira-pii commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Part 3 of 9 for #11488. On top of PR #11943.

save_image -web now draws what the display controls chose, so the same script gives matching images with Qt and with the web viewer. -display_option also takes control paths, such as {Nets/Power false}, for that one image.

It also matches Qt in two small ways: the image size is rounded as Qt rounds it (1099 px, not 1100), and IO pin names are drawn only when they fit in the margin. The web renderer writes only PNG, so a path that does not end in .png gets .png added, as Qt does.

gui.i and gui.tcl now build without Qt too, so a script can call the
gui:: commands in any build; with no window they still log GUI-0001.

Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
With no Qt window, the display controls act on a copy of the Qt
display-control tree kept by the web viewer, with the same paths and defaults.

Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
save_image -web draws what the gui:: display controls chose, and a path
that does not end in .png gets .png added.

Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
@github-actions

Copy link
Copy Markdown
Contributor

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a ScriptView and a DisplayControlTree to enable GUI display controls and headless image rendering (save_image -web) in builds without Qt or when no Qt window is active. It unifies the display-control paths, defaults, and behaviors between the web viewer and the Qt GUI, and updates tests and build configurations accordingly. The feedback points out that temporary overrides of renderer controls specified in -display_option are currently silently ignored, and suggests adding a warning log to inform the user of this limitation.

Comment on lines +269 to +273
for (const Match& match : matches) {
if (match.leaf != nullptr) {
match.leaf->visible = value;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When a renderer control is specified in -display_option (e.g., -display_option {{"Detailed Router/Graph edges"} false}), it is matched by matchLocked but then silently ignored because match.leaf is nullptr. Since temporary overrides of renderer controls are not supported, we should log a warning to inform the user instead of silently ignoring it.

    for (const Match& match : matches) {
      if (match.leaf != nullptr) {
        match.leaf->visible = value;
      } else {
        logger_->warn(utl::WEB,
                      133,
                      "Temporary override of renderer control {} is not supported; ignoring it.",
                      match.path);
      }
    }

Rows' default for new sites is worked out once, a renderer control's color
is reported as ignored, and RendererControls::check takes the default for a
path it has no value for.

Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
…age-script-view

Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
A renderer's control is shared with the browser, so save_image
-display_option cannot set it for one image; say so instead of ignoring it.

Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant