Add configurable output DPI setting (port of upstream PR #379)
Some checks are pending
Create Examples / build (ubuntu-22.04, 3.7) (push) Waiting to run
Create Examples / build (ubuntu-22.04, 3.8) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.10) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.11) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.12) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.9) (push) Waiting to run
Some checks are pending
Create Examples / build (ubuntu-22.04, 3.7) (push) Waiting to run
Create Examples / build (ubuntu-22.04, 3.8) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.10) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.11) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.12) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.9) (push) Waiting to run
Adds output_dpi field to Options (default 96.0) and passes it to the GraphViz graph attributes. Higher DPI produces sharper PNG/PDF renders, useful for print-quality harness documentation.
This commit is contained in:
parent
79be720eab
commit
3d639f6ec2
@ -87,6 +87,7 @@ class Options:
|
|||||||
color_output_mode: ColorOutputMode = ColorOutputMode.EN_UPPER
|
color_output_mode: ColorOutputMode = ColorOutputMode.EN_UPPER
|
||||||
mini_bom_mode: bool = True
|
mini_bom_mode: bool = True
|
||||||
template_separator: str = "."
|
template_separator: str = "."
|
||||||
|
output_dpi: Optional[float] = 96.0
|
||||||
_pad: int = 0
|
_pad: int = 0
|
||||||
# TODO: resolve template and image paths during rendering, not during YAML parsing
|
# TODO: resolve template and image paths during rendering, not during YAML parsing
|
||||||
_template_paths: List = field(default_factory=list)
|
_template_paths: List = field(default_factory=list)
|
||||||
|
|||||||
@ -632,6 +632,7 @@ def set_dot_basics(dot, options):
|
|||||||
bgcolor=options.bgcolor.html,
|
bgcolor=options.bgcolor.html,
|
||||||
nodesep="0.33",
|
nodesep="0.33",
|
||||||
fontname=options.fontname,
|
fontname=options.fontname,
|
||||||
|
dpi=f"{options.output_dpi}",
|
||||||
) # TODO: Add graph attribute: charset="utf-8",
|
) # TODO: Add graph attribute: charset="utf-8",
|
||||||
dot.attr(
|
dot.attr(
|
||||||
"node",
|
"node",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user