Repository navigation
web: save_image renders the script view - #11944
jorge-ferreira-pii wants to merge 6 commits into
Conversation
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>
|
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. |
There was a problem hiding this comment.
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.
| for (const Match& match : matches) { | ||
| if (match.leaf != nullptr) { | ||
| match.leaf->visible = value; | ||
| } | ||
| } |
There was a problem hiding this comment.
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>
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.