Fandom

Livecode Wiki

Brush

1,968pages on
this wiki
Add New Page
Comments0 Share

Specifies the shape used for painting with the Brush tool.Syntax:

set the brush to {<brushID> | <imageID>}

Examples:

set the brush to 13
set the brush to the short ID of image "My Custom Brush"

Use the brush property to specify which shape is painted by the Brush tool.

The entire area of the brush cursor is used as the brush shape. The shape painted by the brush is drawn in the brushColor, regardless of what colors might be in the image(keyword) used for the brush shape.

When the Brush tool is in use, the cursor is the same as the brush shape. You can use any size image as a brush, but the cursor may appear distorted on some systems if the image is not 16x16 pixels.

In order to use a brush, you must choose the Brush tool using either the Paint Tools palette or the choose command.

If you want to change the brush property in a [[standalone application]]--for example, to let the user paint in images--you must copy the stack "revCompatibilityBrushes1" into your application before you build the standalone. (This stack includes the cursors used for the brush tool.) To copy the stack, enter the following into the message box or a handler :

   clone stack "revCompatibilityBrushes1"
   set the mainStack of this stack to "My Main Stack"
   -- (substitute your application's main stack name


A copy of "revCompatibilityBrushes1" is now a substack of your main stack, and will be saved in the stack file the next time you save the main stack.

  • Tip:* If you want to create your own brush cursors, clone the

"revCompatibilityBrushes1" stack and change the images in it to the desired shapes. Make sure to include the stack when you build the [[standalone application|standalone]].

See also: stack (object),image (object),spray (property),eraser (property),

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.