PlotterConfig¶
- class PlotterConfig(name, paper_configs, plotter_unit_length, pen_count, info='')¶
Data class containing configuration for a given plotter type.
Methods
Attached to frozen classes as __delattr__.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Method generated by attrs for class PlotterConfig.
Attached to frozen classes as __setattr__.
- rtype
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
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.paper_config(paper)¶
Return the paper configuration for
paper
or none if not found.- Parameters
paper (
str
) -- desired paper format designator- Return type
- Returns
the
PaperConfig
instance corresponding topaper
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 beNone
, in which caseNone
is returned- Return type
- Returns
the
PaperConfig
instance corresponding topaper_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))¶