.setBlend( mode )

Changes the blending mode when you draw on to this Image. The 'mode' given should be a string or symbol describing the mode to switch to.

Currently this supports 4 types of blending:

'clear' and 'stencil' allow you to clear items from this Image using the standard drawing methods. This helps you to generate more complex images.

How much of an effect these have is based on the alpha value. An alpha value of 0 will have effect, whilst an alpha value of 1 has the maximum effect possible.

.setBlend( mode ) { ... }

This localizes the change in the mode to just the block. The block is executed, and when the block returns, the blend is set back to what it was before this method was called.

See also

setAlpha - setColor