Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

BrushBlend Class Reference

Inherits Brush.

List of all members.


Detailed Description

A blending brush that takes any number of input brushes and layers them together.


Public Types

enum  Blend {
  Normal = 0, Multiply = 1, Add = 2, Subtract = 3,
  Difference = 4, Darken = 5, Lighten = 6, Hue = 7,
  Saturation = 8, Color = 9, Luminance = 10
}
 The available blending modes that determines the blending color from the current (a) and layer (b) colors. More...


Public Member Functions

void add (Brush brush)
 Add an opaque layer to the brush using normal blend mode.

void add (Brush brush, Blend blend)
 Add an opaque layer to the brush.

void add (Brush brush, Blend blend, ubyte alpha)
 Add a layer to the brush.

Color eval (float x, float y)
 Cycle through the layers on the brush, sampling at each point and blending the colors together.


Static Public Member Functions

Color blendColor (Color a, Color b, Blend m)
 Get the blending color from the current color (a), the layer color (b), and the blending mode (m).


Public Attributes

Layer[] layers
 The list of layers in the brush, modified using add.


Member Enumeration Documentation

enum BrushBlend::Blend
 

The available blending modes that determines the blending color from the current (a) and layer (b) colors.

Enumeration values:
Normal  Normal blending (b).
Multiply  Multiply the colors together (a * b).
Add  Add the colors together (a + b).
Subtract  Subtract the colors (a - b).
Difference  Get the difference between the colors (abs (a - b)).
Darken  Get the minimum intensity of each channel (min (a, b)).
Lighten  Get the maximum intensity of each channel (max (a, b)).
Hue  Use the hue from the layer color (a with hue from b).
Saturation  Use the saturation from the layer color (a with saturation from b).
Color  Use the hue and saturation from the layer color (a with hue and saturation from b).
Luminance  Use the luminance/value from the layer color (a with luminance from b).


Member Function Documentation

Color BrushBlend.eval float  x,
float  y
 

Cycle through the layers on the brush, sampling at each point and blending the colors together.

The blending mode of the first layer is ignored (but its opacity is not).

Reimplemented from Brush.


Member Data Documentation

Layer [] BrushBlend.layers
 

The list of layers in the brush, modified using add.

You can modify this list to your pleasure; however, pointers to it will be invalidated by an add call.


The documentation for this class was generated from the following file:
Generated on Thu Sep 4 13:12:51 2003 for dig by doxygen 1.3.2