from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ColorCls:
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("color", core, parent)
[docs]
def get_match(self) -> int:
"""
``MTESt:COLor:MATCh`` \n
Snippet: ``value: int = driver.mtest.color.get_match()`` \n
Sets the color of samples that violated the mask.
:return: clr_matched_pixel: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
response = self._core.io.query_str_with_opc('MTESt:COLor:MATCh?')
return Conversions.str_to_int(response)
[docs]
def set_match(self, clr_matched_pixel: int) -> None:
"""
``MTESt:COLor:MATCh`` \n
Snippet: ``driver.mtest.color.set_match(clr_matched_pixel = 1)`` \n
Sets the color of samples that violated the mask.
:param clr_matched_pixel: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
param = Conversions.decimal_value_to_str(clr_matched_pixel)
self._core.io.write_with_opc(f'MTESt:COLor:MATCh {param}')
[docs]
def get_un_match(self) -> int:
"""
``MTESt:COLor:UNMatch`` \n
Snippet: ``value: int = driver.mtest.color.get_un_match()`` \n
Sets the color of masks segments that were not hit.
:return: clr_unmatched_msk: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
response = self._core.io.query_str_with_opc('MTESt:COLor:UNMatch?')
return Conversions.str_to_int(response)
[docs]
def set_un_match(self, clr_unmatched_msk: int) -> None:
"""
``MTESt:COLor:UNMatch`` \n
Snippet: ``driver.mtest.color.set_un_match(clr_unmatched_msk = 1)`` \n
Sets the color of masks segments that were not hit.
:param clr_unmatched_msk: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
param = Conversions.decimal_value_to_str(clr_unmatched_msk)
self._core.io.write_with_opc(f'MTESt:COLor:UNMatch {param}')
[docs]
def get_interior(self) -> int:
"""
``MTESt:COLor:INTerior`` \n
Snippet: ``value: int = driver.mtest.color.get_interior()`` \n
Sets the color of mask segments the signal has entered into.
:return: clr_matched_msk_interior: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
response = self._core.io.query_str_with_opc('MTESt:COLor:INTerior?')
return Conversions.str_to_int(response)
[docs]
def set_interior(self, clr_matched_msk_interior: int) -> None:
"""
``MTESt:COLor:INTerior`` \n
Snippet: ``driver.mtest.color.set_interior(clr_matched_msk_interior = 1)`` \n
Sets the color of mask segments the signal has entered into.
:param clr_matched_msk_interior: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
param = Conversions.decimal_value_to_str(clr_matched_msk_interior)
self._core.io.write_with_opc(f'MTESt:COLor:INTerior {param}')
[docs]
def get_border(self) -> int:
"""
``MTESt:COLor:BORDer`` \n
Snippet: ``value: int = driver.mtest.color.get_border()`` \n
Sets the color of masks segments that were touched at the border. In this case, the resolution is not sufficient to
detect if the mask was really hit or not. Zoom into the concerned area to see the actual result.
:return: clr_matched_msk_border: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
response = self._core.io.query_str_with_opc('MTESt:COLor:BORDer?')
return Conversions.str_to_int(response)
[docs]
def set_border(self, clr_matched_msk_border: int) -> None:
"""
``MTESt:COLor:BORDer`` \n
Snippet: ``driver.mtest.color.set_border(clr_matched_msk_border = 1)`` \n
Sets the color of masks segments that were touched at the border. In this case, the resolution is not sufficient to
detect if the mask was really hit or not. Zoom into the concerned area to see the actual result.
:param clr_matched_msk_border: Decimal value corresponding to the ARGB hex value that is shown in the Color dialog box. ARGB is a 32-bit unsigned integer with alpha, red, green, blue word order. Alpha defines the transparency. To get the value, covert the hex value from the dialog to decimal value.
"""
param = Conversions.decimal_value_to_str(clr_matched_msk_border)
self._core.io.write_with_opc(f'MTESt:COLor:BORDer {param}')