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/
This commit is contained in:
Tobias Falk 2024-06-08 18:23:29 +02:00
parent a3281b07a2
commit f00aad4916
2 changed files with 2 additions and 0 deletions

View File

@ -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:

View File

@ -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",