/ comp / gb.image / image / gradient
Image.Gradient (gb.image)
Syntax

    STATIC FUNCTION Gradient ( Width AS Integer, Height AS Integer, SrcColor AS Integer, DstColor AS Integer, Orientation AS Integer [ , XDecay AS Float, YDecay AS Float ] ) AS Image

Creates a gradient from color SrcColor to color DstColor of the specified type and returns it as a new image.

- Width is the image width.
- Height is the image height.
- SrcColor is the gradient start color.
- DstColor is the gradient end color.
- Orientation is the type of the gradient.

The gradient type can be one of the following constants:

- Image.Vertical
- Image.Horizontal
- Image.Diagonal
- Image.Cross
- Image.Pyramid
- Image.Rectangle
- Image.PipeCross
- Image.Elliptic

If XDecay and YDecay are specified, then this function will create an unbalanced gradient.

It is a gradient where the transition from start color SrcColor to end color DstColor is not linear, but in this case, exponential.

XDecay and YDecay specify the decay of the gradient. Their value is between -1 and +1.