21.1 Overview

Brushes are the most flexible image type in Hollywood. You can create a brush by either loading an image file from disk using LoadBrush() or creating image data in memory using CreateBrush(). Hollywood's brush library contains a multitude of functions that allow you to transform brushes or process them using a wide variety of image filters. You can also draw to a brush by selecting it as the current output device. This is done by using the SelectBrush() function. See SelectBrush for details. You can also draw to a brush's mask or alpha channel by using the SelectMask() or SelectAlphaChannel() functions, respectively.

Here is a short code snippet which loads a brush from an image file and draws it to the center of the display:

 
LoadBrush(1, "test.jpg")
DisplayBrush(1, #CENTER, #CENTER)

Most other image types in Hollywood can be converted to brushes and vice versa. That's why brushes are the most flexible image type Hollywood offers. For hardware-accelerated drawing, Hollywood also supports hardware brushes. See Hardware brush information for details.

Normally, brushes contain raster pixel data, but Hollywood also supports special vector brushes which consist of vector path data instead and can thus be freely transformed. See Vector brush information for details.


Show TOC