# IK Gradient Linear

IK Gradient Linear Image Number, X1, Y1, X2, Y2, Color1, Color2, Channel, Mode

## Description

Draws a linear gradient. You can use the Mode parameter to control how it is drawn by specifying any combination of flags (see list). A flag can be combined by adding them together. By using the Channel parameter, you can mask channels for the gradient. This command does not work on render targets but the same effect can be achieved using the effect commands of Image Kit and a pixel shader.
A list of available modes are:

Constant name | Constant | Description
GRADIENT_FILLSTART | 1 | If this flag is specified, the area before the gradient will be colored with Color1.
GRADIENT_FILLEND | 2 | If this flag is specified, the area behind the gradient will be colored with Color2.

For example: IK Gradient Linear 1, 5, 5, 251, 5, rgb(255, 0, 0), rgb(0, 255, 0), 0x00FFFF00, 3
This will draw a gradient starting at (5, 5) with the color red and ending in (251, 5) with the color green. At the same time it will ignore the alpha and blue channel when drawing. The 3 (=1 + 2) specifies that the area before and after the gradient are used as well.

## Parameters

Image Number | Integer | The ID of the image.
X1 | Integer | The X coordinate of the starting point of the gradient.
Y1 | Integer | The Y coordinate of the starting point of the gradient.
X2 | Integer | The X coordinate of the end point of the gradient.
Y2 | Integer | The Y coordinate of the end point of the gradient.
Color1 | DWORD | The Color of the starting point of the gradient.
Color2 | DWORD | The color of the end point of the gradient.
Channel | DWORD | The channel(s) used for the gradient.
Mode | Integer | The draw mode of the gradient.

Index