Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some figures in the Simulation Manual appear to be zoomed to their top-left corner #1048

Closed
avarga opened this issue Sep 10, 2023 · 7 comments
Assignees
Milestone

Comments

@avarga
Copy link
Contributor

avarga commented Sep 10, 2023

In the Simulation Manual for OMNeT++ 6.0, figures generated via Graphviz dot appear zoomed to their top-left corner. Examples:
"Figure 8.4: cFigure class hierarchy", "Figure 9.1: Building and running simulation". This affects both the HTML and PDF versions.

Screenshot from 2023-09-10 09-55-19

@avarga avarga added the new New issue that has not been yet acknowledged label Sep 10, 2023
@avarga
Copy link
Contributor Author

avarga commented Sep 10, 2023

The SVG images generated by dot appear to have a wrong bounding box, 50%-70% smaller than necessary in both dimensions (but aspect ratio is OK). This is obvious when opening the images in e.g. Inkscape:

Screenshot from 2023-09-10 10-03-44

@avarga
Copy link
Contributor Author

avarga commented Sep 10, 2023

Ubuntu 23.04, dot -V says dot - graphviz version 2.43.0 (0).

It seems to be related to following bug: "Generated svg output doesn't fit into its own bounding box" https://gitlab.com/graphviz/graphviz/-/issues/1406, where the last comment says "It does work correctly with 5.0.0."
Unfortunately, Ubuntu ships with 2.43, and graphviz is not available from snap, either.

@avarga
Copy link
Contributor Author

avarga commented Sep 10, 2023

Workaround: Python script to update viewBox in SVG files.

@avarga
Copy link
Contributor Author

avarga commented Sep 10, 2023

Note: removing the width, height, viewBox attributes from the <svg> element makes the PDF output look good, but not the HTML output.

@rhornig
Copy link
Contributor

rhornig commented Sep 13, 2023

cherry picked to the 5.7.x and 6.0.x branch

@rhornig rhornig added this to the 6.0.2 milestone Sep 13, 2023
@rhornig rhornig closed this as completed Sep 13, 2023
@avarga avarga removed the new New issue that has not been yet acknowledged label Oct 24, 2023
@Enough7
Copy link
Contributor

Enough7 commented Nov 20, 2023

Hey guys,
fyi in the webversion the image is still not fixed:
image

@rhornig rhornig self-assigned this Dec 8, 2023
@rhornig
Copy link
Contributor

rhornig commented Jan 30, 2024

updated the website with the upcoming 6.0.3 documentation. Some pictures are still cropped a bit, but much better.

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

No branches or pull requests

3 participants