5. Brushes
| 第 7 章 用 GIMP 绘画 |

## 5. Brushes

图 7.15. Brush strokes example

A number of examples of brushstrokes painted using different brushes from the set supplied with GIMP. All were painted using the Paintbrush tool.

A brush is a pixmap or set of pixmaps used for painting. GIMP includes a set of Paint Tools, which not only perform operations that you would normally think of as painting, but also operations such as erasing, copying, smudging, lightening or darkening, etc. All of the paint tools, except the ink tool, use the same set of brushes. The brush pixmaps represent the marks that are made by single “touches” of the brush to the image. A brush stroke, usually made by moving the pointer across the image with the mouse button held down, produces a series of marks spaced along the trajectory, in a way specified by the characteristics of the brush and the paint tool being used.

Brushes can be selected by clicking on an icon in the Brushes dialog. GIMP's current brush is shown in the Brush/Pattern/Gradient area of the Toolbox. Clicking on the brush symbol there is one way of activating the Brushes dialog.

When you install GIMP, it comes with a number of basic brushes, plus a few bizarre ones that serve mainly to give you examples of what is possible (i. e., the "green pepper" brush in the illustration). You can also create new brushes, or download them and install them so that GIMP will recognize them.

GIMP can use several different types of brushes. All of them, however, are used in the same way, and for most purposes you don't need to worry about the differences when you paint with them. Here are the available types of brushes:

Ordinary brushes

  Most of the brushes supplied with GIMP fall into this category. They are represented in the Brushes dialog by grayscale pixmaps. When you paint using them, the current foreground color (as shown in the Color Area of the Toolbox) is substituted for black, and the pixmap shown in the Brushes dialog represents the mark that the brush makes on the image.

  To create such a brush: create a grayscale image in gray levels, where black is fully visible, white is transparent, with gray levels in between. Do not use transparency for these brushes. Save it with the .gbr extension. Click on the Refresh button in the Brushes Dialog to get it in preview without it being necessary to restart GIMP.

彩色笔刷

  此类别中的笔刷由笔刷对话框中的彩色图像表示。它们可以是图片或文本。当你用它们作画时，使用的颜色如显示的一样；当前的前景色不起作用。否则，它们的工作方式与普通笔刷相同。

  To create such a brush, create a small RGBA image:

  Select File → New… from the main menu.

  In the Advanced Options, set for example the Color space to RGB color and set Fill with to Transparency.

  Draw your image. Contrary to grayscale brushes, transparent areas here will be drawn transparent.

  Select File → Save… from the main menu to first save your image as an `.xcf` file to keep its properties.

  Select File → Export As… from the main menu to export the image as a brush with the `.gbr` extension.

  In the Brushes Dialog, click on the button Refresh brushes .

  Your brush appears among the other brushes. You can use it immediately, without restarting GIMP.

  | 提示
  When you do a Copy or a Cut on a selection, you see the contents of the clipboard (that is the selection) at the first position in the brushes dialog. And you can use it for painting.

  图 7.16. Selection to Brush after Copy or Cut

Image hoses / Image pipes

  此类别中的笔刷可以在图像上制作多种标记。它们由笔刷对话框中笔刷符号右下角的红色小三角形表示。它们有时被称为“动画笔刷”，因为当您描绘出一个笔触时，标记会发生变化。原则上，图像软管笔刷可以非常复杂，尤其是如果您使用平板电脑，根据压力、角度等改变形状时。然而，这些可能性从未真正被利用过；GIMP提供的那些相对简单（但仍然非常有用）。

  You will find an example on how to create such brushes in Animated brushes

参数化笔刷

  这些是使用笔刷编辑器创建的笔刷，它允许您使用简单的图形界面生成各种笔刷形状。参数化笔刷的一个很好的特点是它们可以调整大小。如果当前笔刷是参数化笔刷，则可以使用首选项对话框，使按键按下或鼠标滚轮旋转导致当前笔刷变大或变小。

现在，所有笔刷都可调整大小。事实上，在所有绘画工具的选项框中都有一个滑块可以放大或缩小活动笔刷的大小。如果您正确设置了鼠标滚轮，则可以直接在图像窗口中执行此操作；请参阅改变笔刷大小。

除了画笔像素图，每个GIMP笔刷还有一个重要的属性：笔刷间距。这表示绘制连续笔触时连续笔刷标记之间的距离。每个笔刷都有一个指定的默认值，可以使用笔刷对话框进行修改。

| 注意
GIMP 可以使用 MyPaint 笔刷。更多信息参见第 3.11 节 “MyPaint Brush”。

### 5.1. Adding New Brushes

| 注意
There is a quick method to add a new brush: 第 5.4 节 “Creating a brush quickly”.

To add a new brush, after either creating or downloading it, you need to save it in a format GIMP can use. The brush file needs to be placed in the GIMP's brush search path, so that GIMP is able to index and display it in the Brushes dialog. You can hit the Refresh button, which reindexes the brush directory. GIMP uses three file formats for brushes:

RGB

  The `.gbr` ("gimp brush") format is used for ordinary and color brushes. You can convert many other types of images, including many brushes used by other programs, into GIMP brushes by opening them in GIMP and saving them with file names ending in `.gbr`. This brings up a dialog box in which you can set the default Spacing for the brush.

  A technical specification of the GBR file format can be found on developer.gimp.org.

  图 7.17. Save a `.gbr` brush

GIF

  The `.gih` ("gimp image hose") format is used for animated brushes. These brushes are constructed from images containing multiple layers: each layer may contain multiple brush-shapes, arranged in a grid. When you save an image as a `.gih` file, a dialog comes up that allows you to describe the format of the brush. See 第 5.2 节 “Creating animated brushes” for more information about the dialog.

  A technical specification of the GIH file format can be found on developer.gimp.org.

VBR

  The `.vbr` format is used for parametric brushes, i. e., brushes created using the Brush Editor. There is really no other meaningful way of obtaining files in this format.

MYB

  The `.myb` format is used for MyPaint brushes. Please refer to 第 3.11 节 “MyPaint Brush” for more information.

To make a brush available, place it in one of the folders in GIMP's brush search path. By default, the brush search path includes two folders, the system `brushes` folder, which you should not use or alter, and the `brushes` folder inside your personal GIMP directory. You can add new folders to the brush search path using the Brush Folders page of the Preferences dialog. Any GBR, GIH, or VBR file included in a folder in the brush search path will show up in the Brushes dialog the next time you start GIMP, or as soon as you press the Refresh button in the Brushes dialog.

| 注意
When you create a new parametric brush using the Brush Editor, it is automatically saved in your personal `brushes` folder.

There are a number of web sites with downloadable collections of GIMP brushes. Rather than supplying a list of links that will soon be out of date, the best advice is to do a search with your favorite search engine for “GIMP brushes”. There are also many collections of brushes for other programs with painting functionality. Some can be converted easily into GIMP brushes, some require special conversion utilities, and some cannot be converted at all. Most fancy procedural brush types fall into the last category. If you need to know, look around on the web, and if you don't find anything, look for an expert to ask.

4.7. Paths and SVG files |  | 5.2. Creating animated brushes

Report a bug in GIMP Report a documentation error