Source code for RsFsw.Implementations.HardCopy.Page.Window.Scale

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ScaleCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("scale", core, parent)

[docs] def set(self, scale: bool) -> None: """ ``HCOPy:PAGE:WINDow:SCALe`` \n Snippet: ``driver.hardCopy.page.window.scale.set(scale = False)`` \n This command determines the scaling of the windows in the printout for method ``RsFsw.hardCopy.content.set()`` . :param scale: 1 | 0 | ON | OFF 1 | ON Each window is scaled to fit the page size optimally, not regarding the aspect ratio of the original display. If more than one window is printed on one page (see method ``RsFsw.hardCopy.page.window.count.set()`` ) , each window is printed in equal size. ('Size to fit') 0 | OFF Each window is printed as large as possible while maintaining the aspect ratio of the original display. ('Maintain aspect ratio') """ param = Conversions.bool_to_str(scale) self._core.io.write(f'HCOPy:PAGE:WINDow:SCALe {param}')
[docs] def get(self) -> bool: """ ``HCOPy:PAGE:WINDow:SCALe`` \n Snippet: ``value: bool = driver.hardCopy.page.window.scale.get()`` \n This command determines the scaling of the windows in the printout for method ``RsFsw.hardCopy.content.set()`` . :return: scale: 1 | 0 | ON | OFF 1 | ON Each window is scaled to fit the page size optimally, not regarding the aspect ratio of the original display. If more than one window is printed on one page (see method ``RsFsw.hardCopy.page.window.count.set()`` ) , each window is printed in equal size. ('Size to fit') 0 | OFF Each window is printed as large as possible while maintaining the aspect ratio of the original display. ('Maintain aspect ratio') """ response = self._core.io.query_str(f'HCOPy:PAGE:WINDow:SCALe?') return Conversions.str_to_bool(response)