Grad
Function
This function generates a gradation between four differently colored corners.
The corners are counted with corner1 in the lower left, corner 2 in the lower
right, etc. To do a simple ramp, use Ramp.
To do a radial gradation, use RGrad.
Parameters
|
Type
|
Defaults
|
Function
|
width, height |
int
|
GetDefaultWidth(), GetDefaultHeight()
|
width of the image |
bytes |
int
|
1
|
bit depth, 1, 2, or 4 bytes/channel |
xMid,yMid |
float
|
.5, .5
|
The mid-points of the gradation. |
red, green, blue, alpha, depth |
float
|
1, 0, 0, 1, 0,
0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0 |
value of red, green, blue, alpha, and Z channels at each of the four
corners: |
Synopsis
image Grad( int width, int height, int bytes, float xMid, float yMid, float rLL, float gLL, float bLL, float aLL, float dLL, float rLR, float gLR, float bLR, float aLR, float dLR, float rUR, float gUR, float bUR, float aUR, float dUR, float rUL, float gUL, float bUL, float aUL, float dUL );
Script
image = Grad( width, height, bytes, xMid, yMid, etc...);
Command Line
shake -grad width height bytes etc...