Source code for RsSmw.Implementations.HardCopy.Image
from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ImageCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("image", core, parent)
# noinspection PyTypeChecker
[docs]
def get_format_py(self) -> enums.HardCopyImageFormat:
"""
``HCOPy:IMAGe:FORMat`` \n
Snippet: ``value: enums.HardCopyImageFormat = driver.hardCopy.image.get_format_py()`` \n
Selects the graphic format for the hard copy. You can use both commands alternatively.
"""
response = self._core.io.query_str('HCOPy:IMAGe:FORMat?')
return Conversions.str_to_scalar_enum(response, enums.HardCopyImageFormat)
[docs]
def set_format_py(self, format_py: enums.HardCopyImageFormat) -> None:
"""
``HCOPy:IMAGe:FORMat`` \n
Snippet: ``driver.hardCopy.image.set_format_py(format_py = enums.HardCopyImageFormat.BMP)`` \n
Selects the graphic format for the hard copy. You can use both commands alternatively.
:param format_py: BMP | JPG | XPM | PNG
"""
param = Conversions.enum_scalar_to_str(format_py, enums.HardCopyImageFormat)
self._core.io.write(f'HCOPy:IMAGe:FORMat {param}')