Name
csurface:ToBrush -- convert surface to Hollywood brush
Synopsis
[id] = csurface:ToBrush(brush[, color])
Function
Converts the image surface to the Hollywood brush specified by brush. If you pass Nil in brush, automatic id selection will be used and this function will return the identifier of the brush. The optional argument color is only used in case the image surface doesn't have any color channels (e.g. if the pixel format is #CAIRO_FORMAT_A8). In that case, the color channels of the brush will be filled with the color specified in color.

Inputs
brush
identifier of the brush to be created or Nil for auto id selection
color
optional: filling color to use if the surface doesn't have any color channels
Results
id
optional: handle to the new brush; will only be returned if you specified Nil in brush

Show TOC