Window.setMaskRegion

Function/Meaning

Set Windows + window region according to mask

Type
Windowclassmethod of
Syntax
setMaskRegion(threshold=1)
Arguments
threshold

Specifies the mask threshold (threshold value).
The window is cropped and displayed in the shape of the mask of the primary layer (layer opacity information) that is larger than this value.

Return value
None (void)
Explanation

Set the window region according to the mask of the primary layer (layer opacity information).
You can make the window irregular.
To prevent the window size and position from shifting from the displayed primary layer, you need to do the following.
Set Window.borderStyle to bsNone.
Set Layer.imageLeft and Layer.imageTop to 0.

Reference
Window.removeMaskRegion