PlotterConfig¶
- class PlotterConfig(name: str, paper_configs: list[PaperConfig], plotter_unit_length: float, pen_count: int, info: str = '')¶
Data class containing configuration for a given plotter type.
Methods
Return the paper configuration for
paperor none if not found.Look for a paper configuration matching
paper_formatand return it if found.Attributes
information printed to the user when plotter is used
name of the plotter
list of
PaperConfiginstancephysical size of plotter units (in pixel)
number of pen supported by the plotter
Methods¶
- classmethod PlotterConfig.from_config(data: dict[str, Any]) PlotterConfig¶
- Parameters:
- Return type:
- PlotterConfig.paper_config(paper: str) PaperConfig | None¶
Return the paper configuration for
paperor none if not found.- Parameters:
paper (str) -- desired paper format designator
- Returns:
the
PaperConfiginstance corresponding topaperor None if not found- Return type:
PaperConfig | None
- PlotterConfig.paper_config_from_size(page_size: tuple[float, float] | None) PaperConfig | None¶
Look for a paper configuration matching
paper_formatand return it if found.- Parameters:
page_size (tuple[float, float] | None) -- tuple of desired page size (may be
None, in which caseNoneis returned- Returns:
the
PaperConfiginstance corresponding topaper_formator None if not found- Return type:
PaperConfig | None
Attributes¶
- PlotterConfig.paper_configs: list[PaperConfig]¶
list of
PaperConfiginstance