Compartilhar via


Creating a Custom Brush (Image Editor for Icons)

A custom brush is a rectangular portion of an image that you pick up and use like one of the Image editor's ready-made brushes. All operations you can perform on a selection, you can perform on a custom brush as well.

To create a custom brush from a portion of an image

  1. Select the part of the image that you want to use for a brush.

  2. Holding the SHIFT key down, click in the selection and drag it across the image.

    - or -

  3. From the Image menu, choose Use Selection as Brush.

    Your selection becomes a custom brush that distributes the colors in the selection across the image. Copies of the selection are left along the dragging path. The more slowly you drag, the more copies are made.

    Note   Clicking the Use a Selection as Brush without first selecting a portion of the image will use the whole image as a brush. The result of using a custom brush will also depend on whether you've selected an Opaque or Transparent background.

Pixels in a custom brush that match the current background color are normally transparent: they do not paint over the existing image. You can change this behavior so that background-color pixels paint over the existing image.

You can use the custom brush like a stamp or a stencil to create a variety of special effects.

To draw custom brush shapes in the background color

  1. Select an opaque or transparent background.

  2. Set the background color to the color in which you want to draw.

  3. Position the custom brush where you want to draw.

  4. Click the right mouse button. Any opaque regions of the custom brush are drawn in the background color.

To double or halve the custom brush size

  • Press the PLUS SIGN (+) key to double the brush size, or the MINUS SIGN () key to halve it.

To cancel the custom brush

  • Press ESC or choose another drawing tool.

For information on adding resources to managed projects, please see Resources in Applications in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resources strings to properties, see Walkthrough: Localizing Windows Forms and Walkthrough: Using Resources for Localization with ASP.NET.

Requirements

None

See Also

Reference

Accelerator Keys (Image Editor for Icons)

Editing Graphical Resources (Image Editor for Icons)

Image Editor for Icons