Brush drawing tool

Log-in or register.

Brush drawing tool

rsrc/brush-tool.png image BRUSH is a drawing tool for free hand drawing. It uses either a predefined brush shape (round, rectangular or diagonal) or a custom image. In either case, the shape of image is drawn repeatedly along the brush path. To use the brush tool, press and hold left mouse button and move the mouse over the canvas.

rsrc/brush-shape.png image
Round brush strokes with various Size and Blur.
rsrc/brush-image.png image
Heart drawn with picture brush of flowers.

The brush tool can be used with pressure-sensitive tablets. If you have a tablet with pressure sensitivity (and an installed driver), the pen pressure can control brush width, sharpness or intensity.

Configuration

rsrc/brush-tool-config.png image

Shape brush

Use the upper Shape box to select the brush shape.

The Size box sets the diameter of the brush in pixels. It applies to shape brushes and image brushes.

The Blur box determines the sharpness/blurriness of the shape brushes.

rsrc/brush-blur.png image
Blur: 90% - 50% - 10%.

The Flow box controls how intense is the brush. For shape brushes, it controls the opacity of the brush.

rsrc/brush-flow.png image
Flow: 100% - 60% - 20%.

The check-boxes near Size, Blur, and Flow control whether the tablet pen pressure should influence the actual value set in these boxes.

The shape brush does not use fill styles, it always uses just the primary color.

Picture brush

Press the "..." button next to the shape selection box to pick a custom image brush. Any picture or animation can used as a picture brush.

The Size and Flow controls apply to picture brushes. The Flow parameter controls how often is the image drawn.

The last 3 controls (Scatter, Rotate and Resize) apply to image brushes only. If Scatter is enabled, the position of the drawn image is randomly shifted each time the image is drawn. Rotate randomly rotates the image and Resize randomly increases or decreases the image size.

rsrc/brush-scatter-rotate-resize.png image
Disabled <- [scatter, rotate, resize] -> Enabled

Learn more by watching the Picture brush tutorial.

Scripting parameters

BRUSH tool can be used from scripts. The command in script must have the following arguments:

  • shape - one of "ROUND", "SQUARE", "DIAGONAL".
  • size - diameter or bounding box of the pattern in pixels.
  • size_pressure (optional) - must be set to "NP" (normal pressure) or not used at all. If used, the pressure parameter in coords array will be used to control size.
  • blur - controls how sharp of soft are the edges of the pattern in range 0-1.
  • blur_pressure (optional) - must be set to "NP" or not used at all.
  • flow - intensity used when drawing the pattern in range 0-1.
  • flow_pressure (optional) - must be set to "NP" or not used at all.
  • coords - at least 2 pairs of [X, Y] coordinates or triplets of [X, Y, pressure] if at least one of the brush parameters reacts to pressure. The pressure parameter will be clamped to <0.05, 1> range (which means you can draw only a single stroke with one command).

Example

DrawTool.BRUSH(Document, "ROUND", 12, "NP", 0.1, 1,
               50, 50, 0.1, 100, 100, 1, 150, 50, 1, 200, 100, 0.1);

See also: DrawTool object, Document object

Recent comments

user icon Anonymous
Select background









I wish there were...