An image mask is a bitmap that specifies an area to paint, but not the color. In effect, an image mask acts as a stencil to specify where to place color on the page. Quartz uses the current fill color to paint an image mask.

A mask is a format expression mainly used in formatting user input in forms.

Common examples of this are date input fields that accepts only numbers and format the typed input with the needed characters:

User enters      Field contents
1                1
12               12
123              12/3
1231             12/31
...              ...
12312012         12/31/2012