Mask¶
- class Mask¶
Returned by
- Clone()¶
Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.
- Returns:
A copy of this object
- Return type:
- GetDistanceX()¶
Returns the horizontal offset between each duplicated instance of this mask. See
SetRepetitionX()to configure horizontal repetition.- Returns:
Horizontal distance between repetitions
- Return type:
int
- GetDistanceY()¶
Returns the vertical offset between each duplicated instance of this mask. See
SetRepetitionY()to configure vertical repetition.- Returns:
Vertical distance between repetitions
- Return type:
int
- GetHeight()¶
Returns the mask height.
- Returns:
Mask height
- Return type:
int
- GetName()¶
Returns the name of this mask. Only applicable for submasks. The root mask of a mask file has no name. Instead, it will be referenced at runtime using its filename.
- Returns:
The mask name if it is a submask, otherwise None
- Return type:
str
- GetRepetitionX()¶
Returns the horizontal repetition. The mask will be duplicated this amount of times in horizontal direction.
- Returns:
Horizontal repetition
- Return type:
int
- GetRepetitionY()¶
Returns the vertical repetition. The mask will be duplicated this amount of times in vertical direction.
- Returns:
Vertical repetition
- Return type:
int
- GetWidth()¶
Returns the mask width.
- Returns:
Mask width
- Return type:
int
- GetX()¶
Returns the x position.
- Returns:
x position
- Return type:
int
- GetY()¶
Returns the y position.
- Returns:
y position
- Return type:
int
- Save(filePath)¶
Saves the mask to a file.
- Parameters:
- filePath : str¶
Filename or path to the mask file. A relative path will be resolved to the ‘Images’ directory of the current workspace.
- SetDistanceX(distanceX)¶
Sets the horizontal offset between each duplicated instance of this mask. See
SetRepetitionX()to configure horizontal repetition.- Parameters:
- distanceX : int¶
New horizontal distance between repetitions
- SetDistanceY(distanceY)¶
Sets the vertical offset between each duplicated instance of this mask. See
SetRepetitionY()to configure vertical repetition.- Parameters:
- distanceY : int¶
New vertical distance between repetitions
- SetRepetitionX(repetitionX)¶
Sets how many times the mask will be duplicated in horizontal direction.
- Parameters:
- repetitionX : int¶
New horizontal repetition
- SetRepetitionY(repetitionY)¶
Sets how many times the mask will be duplicated in vertical direction.
- Parameters:
- repetitionY : int¶
New vertical repetition