From f00aad49168599c8e504ff9d037340573e827afe Mon Sep 17 00:00:00 2001 From: Tobias Falk Date: Sat, 8 Jun 2024 18:23:29 +0200 Subject: [PATCH] Added option to set the dpi of the output this adds the option 'output_dpi' for the user. This is used to set the 'dpi' of the output, the default is 96 wich is also the default GraphViz default. https://graphviz.org/docs/attrs/dpi/ --- src/wireviz/DataClasses.py | 1 + src/wireviz/Harness.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/wireviz/DataClasses.py b/src/wireviz/DataClasses.py index 5b4bb06..c3acc14 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 30468a6..02dabd0 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -172,6 +172,7 @@ class Harness: 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",