PlotterConfig

class PlotterConfig(name, paper_configs, plotter_unit_length, pen_count, info='')

Data class containing configuration for a given plotter type.

Methods

from_config

rtype

PlotterConfig

paper_config

Return the paper configuration for paper or none if not found.

paper_config_from_size

Look for a paper configuration matching paper_format and return it if found.

Attributes

info

information printed to the user when plotter is used

name

name of the plotter

paper_configs

list of PaperConfig instance

plotter_unit_length

physical size of plotter units (in pixel)

pen_count

number of pen supported by the plotter

Methods

classmethod PlotterConfig.from_config(data)
Return type

PlotterConfig

PlotterConfig.paper_config(paper)

Return the paper configuration for paper or none if not found.

Parameters

paper (str) -- desired paper format designator

Return type

Optional[PaperConfig]

Returns

the PaperConfig instance corresponding to paper or None if not found

PlotterConfig.paper_config_from_size(page_size)

Look for a paper configuration matching paper_format and return it if found.

Parameters

page_size (Optional[Tuple[float, float]]) -- tuple of desired page size (may be None, in which case None is returned

Return type

Optional[PaperConfig]

Returns

the PaperConfig instance corresponding to paper_format or None if not found

Attributes

PlotterConfig.info: str = ''

information printed to the user when plotter is used

PlotterConfig.name: str

name of the plotter

PlotterConfig.paper_configs: List[vpype.config.PaperConfig]

list of PaperConfig instance

PlotterConfig.plotter_unit_length: float

physical size of plotter units (in pixel)

PlotterConfig.pen_count: int

number of pen supported by the plotter