Compartilhar via


Create an opacity mask

An opacity mask is a brush whose color is ignored and whose opacity is transferred to the masked object. Wherever the opacity mask is opaque, the masked object will be opaque; wherever the opacity mask is transparent, the masked object will be transparent. Any object can have an opacity mask defined for it through the Appearance section of the Properties panel. For more information about opacity masks, see Opacity masks.

To create an opacity mask on an object using a gradient brush

  1. In the Toolbox, click Selection Cc294816.2ff91340-477e-4efa-a0f7-af20851e4daa(en-us,Expression.10).png, and then select a path on the artboard.

  2. Under Brushes in the Properties panel, select OpacityMask from the list, and then click the GradientBrushCc294816.91fb0c61-7b3b-4ae7-8a59-760e625e3bd7(en-us,Expression.10).png tab, and then at the bottom of the color editor, select the LineargradientCc294816.209508b1-adaa-4293-8d02-23cade0c599e(en-us,Expression.10).png or RadialgradientCc294816.2b3b2e7c-204f-4f66-9c1c-540698186242(en-us,Expression.10).png option.

  3. To make sure that the mask allows at least a small portion of the object or objects behind to show through, define at least one gradient stop with an alpha value of less than 100 percent.

Cc294816.7e183f1f-37d8-4dcb-980c-19a5d61ca087(en-us,Expression.10).gifBack to top

To create an opacity mask on an object using a brush resource

  1. Create a Grid Cc294816.a87ee957-7fbf-4135-a6ab-6de7e63160aa(en-us,Expression.10).pngor other layout panel element on the artboard.

  2. Double-click the panel element in order to activate it so that you can add child elements.

  3. Add various child elements that will make up your opacity mask.

  4. For all of your elements, including the layout panel, adjust the Opacity property under Appearance in the Properties panel.

  5. When you have completed your opacity mask design, select the layout panel under Objects and Timeline, and then on the Tools menu, point to Make Brush Resource, and select one of the following available brush types:

    • Make Drawing Brush Resource   A drawing brush paints an area with a drawing, which can include shapes, text, video, images, or other drawings.

    • Make Visual Brush Resource   A visual brush paints an area with a visual that can be updated during runtime if the brush is created from a panel that contains animations or interactive controls. The Create Brush Resource dialog box appears.

    Note

    A brush resource can be made from any object on the artboard, including art assets that are imported from Microsoft Expression Design 2. Remember that the colors of your brush will be ignored when applied as opacity mask, because only the opacity values create the masking effect.

    The Create Brush Resource dialog box appears.

  6. Under Resource name (Key), enter a key name. This is the name by which other elements can reference the resource, thus applying the resource to themselves.

  7. Under Define in, select the option where you want the resource to be defined:

    • To make the resource available to any document in your application, select Application.

    • To make the resource available only to the current document, select This document(Window: Window).

    • To make the resource available only to the object from which you created the resource or its child objects, select This document (object).

    • To define the resource in a resource dictionary file that can be reused in other projects, select Resource dictionary. You can then select an existing resource dictionary file or create a New one.

  8. Click OK to exit the dialog box and create the resource.

  9. To apply the brush resource as an opacity mask on your object, you can do one of the following:

    • In the Resources panel, locate your brush resource, and then drag it onto the object on the artboard that you want to mask.

    • Select the object that you want to mask, and then under Brushes in the Properties panel, click the Brush resourcesCc294816.415db740-5a54-48d2-8678-245ccfa7ee8b(en-us,Expression.10).png tab and select your brush resource.

Cc294816.7e183f1f-37d8-4dcb-980c-19a5d61ca087(en-us,Expression.10).gifBack to top