diff --git a/docs/syntax.md b/docs/syntax.md index de672847..37e25e94 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -387,6 +387,9 @@ If any component is defined in the `connectors` or `cables` sections but not ref # about additional components inside the diagram node (connector/cable box). # If False, show all info about additional components inside the diagram node. mini_bom_mode: # Default = True + + # DPI setting for image outputs, https://graphviz.org/docs/attrs/dpi/ + output_dpi: # Default 96.0 ``` diff --git a/src/wireviz/DataClasses.py b/src/wireviz/DataClasses.py index 5b4bb068..c3acc145 100644 --- a/src/wireviz/DataClasses.py +++ b/src/wireviz/DataClasses.py @@ -58,6 +58,7 @@ class Options: color_mode: ColorMode = "SHORT" mini_bom_mode: bool = True template_separator: str = "." + output_dpi: Optional[float] = 96.0 def __post_init__(self): if not self.bgcolor_node: diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index 30468a6a..02dabd0a 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -172,6 +172,7 @@ def create_graph(self) -> Graph: bgcolor=wv_colors.translate_color(self.options.bgcolor, "HEX"), nodesep="0.33", fontname=self.options.fontname, + dpi = f'{self.options.output_dpi}', ) dot.attr( "node",