UM:Appendix Monitormasks Spec
Mask/Blank areas of the image. This is a view only mode and is not exported or rendered.
File Specification
• | A masks file must end in the extension '.masks', e.g. test.masks |
• | It should be a plain text file |
Each specification file specifies one or more masks, each identified by unique name (a name parameter).
Format
The mask file format is as follows :
monitorMasks 1.0 -1 { monitorMask 1.0 -1 { <mask specification> }
monitorMask 1.0 -1 { <mask specification> } ... } |
The mask specification section is described below.
NOTE
• | Mask specification lines must end with a semi-colon ";" character. |
• | A '#' character at line start delimits a comment. Rest of line is ignored. |
• | Strings should be quoted i.e. "string". |
• | There should be a space between each identifier and before the terminating semi-colon. |
Mask Specification
name
name "<STRING>" ; |
This is the name of the mask as shown in the GUI drop-down list.
Mask names should be unique.
units
units "<UNITS>" ; |
where UNITS are :
pixels |
By default the coordinate system is absolute image pixels, lower left to top right. Elements are drawn relative to the lower left corner of a pixel. |
normalised |
Normalised coordinates map the range 0.0..1.0 to the monitor source full image pixel size in x and y. |
unitsImageAspect
unitsImageAspect <FLOAT> ; |
The normalised region may be mapped to an image aspect extraction of the monitor source full image (pre or post monitor mask).
This is achieved by specifying the target image aspect. Given the monitor source image and aspect ratio, the normalised region will automatically be adjusted for 'letterbox' or 'pillarbox' display of the target aspect ratio.
rect
rect <INT x0> <INT y0> <INT x1> <INT y1> ; |
Where :
(x0,y0) is rectangle bottom-left.
(x1,y1) is rectangle top-right.
Mask rectangle defined from x0,y0 to x1,y1 using the current coordinate system. The area outside this rectangle will be blanked.
User Masks
A special mask named "User" will also appear in the GUI list. This allows us to set the mask size and position interactively.
Example Mask Specifications
monitorMask 1.0 -1 { name "1920x1080" ; units "pixels" ; rect 0 0 1920 1080 ; }
monitorMask 1.0 -1 { name "10% in" ; units "normalised" ; rect 0.1 0.1 0.9 0.9 ; } monitorMask 1.0 -1 { name "4:3" ; units "normalised" ; unitsImageAspect 1.333 ; rect 0.0 0.0 1.0 1.0 ; } |