Using Color Gradient Dialog

   Print  Previous  Next

Functions Provided For Setting Effect Directions

Some effects provide more than one color. In this case the so-called »Color Table, »Using Color Gradient, Color Gradient window (described here) or »M2L Color Table is offered by the effect to take control of the colors.

Gradient Dialog

 

The following table provides an overview of all functions the effect can use to modify the colors in a Color Gradient window:

Function

Description

void GradientDlgSetColor(int idx, color c)

Sets the color with the specified index to the given color value. If the index is out of range, nothing happens.

color GradientDlgGetColor(int idx)

Returns the color with the specified index. If the index is out of range, black is returned.

int GradientDlgGetColorCount()

Returns the current number of colors in the Color Gradient window.

void GradientDlgAddColor(color c, float position, int fade)

Adds another color to the Color Gradient window at the specified position. The position value have to be between 0.0 and 1.0. The inserted color will be faded the color before if the fade value is TRUE.

void GradientDlgRemoveColor(int idx)

Removes the color at the specified index. If the given index is out of range, nothing happens.

void GradientDlgSetColorPosition(int idx, float pos)

Sets the color with the specified index to the given position value. The position value have to be between 0.0 and 1.0. If the index is out of range, nothing happens.

float GradientDlgGetColorPosition(int idx)

Returns the position of the color with the specified index. If the index is out of range, 0.0 is returned.

void GradientDlgSetColorFade(int idx, int fade)

Use TRUE to activate the color fade mode for the color with the specified index. Use FALSE to deactivate it.

int GradientDlgGetColorFade(int idx)

Returns TRUE, if the color fade mode is activated for the color with the specified index, otherwise FALSE.

void GradientDlgFadeAllColors(void)

Activates the color fade mode for all colors in the Color Gradient window.

void GradientDlgFadeNoneColors(void)

Deactivates the color fade mode for all colors in the Color Gradient window.

void GradientDlgSetUniformDistances(void)

Sets the position values of each color in the Color Gradient window to get uniform distances between each color.

void GradientDlgInvertColorPositions(void)

Inverts the position values off all colors.

void GradientDlgInvertColors(void)

Inverts all color values.

 

For a detailed description of the non-primitive data type color, see »Using Data Types

 

Remarks

The Gradient Dialog require at least 2 colors. You will not able to overwrite this requirement with a Macro. Some MADRIX effects require the same color at the first and last position.

 

MADRIX Version: 3.6j | Script Version: 2.22
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%
Print   Previous   Next