Select the image layer you want to mask.
Choose Paint > Shape > Make Mask Shape .
The Shape Editor opens.
Click each curve to include in the mask shape. You may click a curve more than once, in several different locations. Make sure you click the part(s) of the curve that you want to include in the mask boundary.
The curves are highlighted.
These curves will define the inner and outer boundaries of the shape.
To remove a curve from the selection, click it.
Do not drag a pick box around complex curve structures, or the shape may not appear as you expect.
Click Accept.
The curves becomes a mask. By default, the outline is turned off, and the fill area, which acts as the mask, is outside the curves.
Set Fill to Inside in the Shape Editor, if you want the fill area (mask) to be inside the curves.
The Shape Editor lets you modify several parameters of the Shape such as color, opacity, and so on.
For a description of each option, see Windows > Editors > Shape Editor.
You can also set Global Auto-Shape Type to Mask in the Paint Panel. Curves that you draw will then automatically create mask shapes.
To create certain shapes, you may need to select the curves that define the shape in more than one location. Simply select each curve segment that forms a boundary of the shape region, even if you must select the same curve more than once.