PlotterConfig#
- class PlotterConfig(name: str, paper_configs: list[vpype.config.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
paper
or none if not found.Look for a paper configuration matching
paper_format
and return it if found.Attributes
information printed to the user when plotter is used
name of the plotter
list of
PaperConfig
instancephysical 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
paper
or none if not found.- Parameters:
paper (str) -- desired paper format designator
- Returns:
the
PaperConfig
instance corresponding topaper
or 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_format
and return it if found.- Parameters:
page_size (tuple[float, float] | None) -- tuple of desired page size (may be
None
, in which caseNone
is returned- Returns:
the
PaperConfig
instance corresponding topaper_format
or None if not found- Return type:
PaperConfig | None
Attributes#
- PlotterConfig.paper_configs: list[vpype.config.PaperConfig]#
list of
PaperConfig
instance