PlotterConfig

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

Data class containing configuration for a given plotter type.

Methods

__delattr__

Attached to frozen classes as __delattr__.

__eq__

Method generated by attrs for class PlotterConfig.

__ge__

Method generated by attrs for class PlotterConfig.

__gt__

Method generated by attrs for class PlotterConfig.

__hash__

Method generated by attrs for class PlotterConfig.

__init__

Method generated by attrs for class PlotterConfig.

__le__

Method generated by attrs for class PlotterConfig.

__lt__

Method generated by attrs for class PlotterConfig.

__ne__

Method generated by attrs for class PlotterConfig.

__repr__

Method generated by attrs for class PlotterConfig.

__setattr__

Attached to frozen classes as __setattr__.

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

__annotations__

__attrs_attrs__

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

info

information printed to the user when plotter is used

Methods

PlotterConfig.__delattr__(name)

Attached to frozen classes as __delattr__.

PlotterConfig.__eq__(other)

Method generated by attrs for class PlotterConfig.

PlotterConfig.__ge__(other)

Method generated by attrs for class PlotterConfig.

PlotterConfig.__gt__(other)

Method generated by attrs for class PlotterConfig.

PlotterConfig.__hash__()

Method generated by attrs for class PlotterConfig.

PlotterConfig.__init__(name, paper_configs, plotter_unit_length, pen_count, info='')

Method generated by attrs for class PlotterConfig.

PlotterConfig.__le__(other)

Method generated by attrs for class PlotterConfig.

PlotterConfig.__lt__(other)

Method generated by attrs for class PlotterConfig.

PlotterConfig.__ne__(other)

Method generated by attrs for class PlotterConfig.

PlotterConfig.__repr__()

Method generated by attrs for class PlotterConfig.

PlotterConfig.__setattr__(name, value)

Attached to frozen classes as __setattr__.

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.__annotations__ = {'info': <class 'str'>, 'name': <class 'str'>, 'paper_configs': typing.List[vpype.config.PaperConfig], 'pen_count': <class 'int'>, 'plotter_unit_length': <class 'float'>}
PlotterConfig.__attrs_attrs__ = (Attribute(name='name', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'str'>, converter=None, kw_only=False, inherited=False, on_setattr=None), Attribute(name='paper_configs', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.List[vpype.config.PaperConfig], converter=None, kw_only=False, inherited=False, on_setattr=None), Attribute(name='plotter_unit_length', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'float'>, converter=None, kw_only=False, inherited=False, on_setattr=None), Attribute(name='pen_count', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'int'>, converter=None, kw_only=False, inherited=False, on_setattr=None), Attribute(name='info', default='', validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'str'>, converter=None, kw_only=False, inherited=False, on_setattr=None))
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

PlotterConfig.info: str

information printed to the user when plotter is used