SCE Color Ramp

   Print  Previous  Next

Functions Provided By SCE Color Ramp

The following table provides an overview of all functions the effect can use:

Function

Description

void SetDirection(int direction)

Sets the direction of the Color Ramp. Please use a define as described below for direction.

int GetDirection()

Returns the direction currently in use.

void SetCrossed(int enable)

Use true or 1 for enable to activate Cross Mode for the Direction. Use false or 0 to deactivate it.

int GetCrossed()

Returns true if "Cross Mode" is enabled, otherwise false.

void SetAngle(int angle)

Sets the angle for the Color Ramp, type Radial.

int GetAngle()

Gets the current angle.

void SetColor(int index, color c)

Sets the color c at the specified index in the Color Ramp. If index is out of range, nothing happens.

color GetColor(int index)

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

int GetColorCount()

Returns the amount of colors currently used by the Color Ramp.

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

Adds another color c to the Color Ramp at the specified position. Valid values for position range from 0.01 to 0.99. If the index is lower or equal to 0, the new color is added to the first position. If index is greater than the current number of colors, the new color is added at the end. Valid values for fade are 1 (On) or 0 (Off).

void RemoveColor(int index)

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

int SetColorPosition(int index, float position)

Sets the color of the given index to a new position and returns the new index. Valid values for position range from 0.01 to 0.99. The first and last color are not allowed to be moved!

float GetColorPosition(int index)

Returns the color position of the given index.

void SetColorFade(int index, fade)

Sets the color fade option for the given index. Valid values for fade are 1 (On) or 0 (Off).

int GetColorFade(int index)

Returns the color fade option for the given index.

void FadeAllColors()

Enables color fade for all colors in the Color Ramp.

void FadeNoneColors()

Disables color fade for all colors in the Color Ramp.

void SetUniformDistances()

Sets uniform distances between each color in the Color Ramp.

void InvertColorPositions()

Inverts the positions of the colors in the Color Ramp.

void InvertColors()

Inverts every single color in the Color Ramp.

 

This Effect uses the Color Ramp. Learn more about Using Colors.

 

Deprecated Functions
Deprecated functions are outdated functions and should not be used anymore.

Function

Description

int SetPosition(int index, float pos)

Use SetColorPosition() instead.

float GetPosition(int index)

Use GetColorPosition() instead.

void SetFade(int index)

Use SetColorFade() instead.

int GetFade(int index)

Use GetColorFade() instead.

 

Directions Of The Color Ramp

In addition to the standard directions,there are five additional directions available:

Value / Define

Description

DIR_OUTWARDS

Sets the Color Ramp type to 'Box Ramp Explode'.

DIR_INWARDS

Sets the Color Ramp type to 'Box Ramp Implode'.

DIR_CIRCLE_OUTWARDS

Sets the Color Ramp type to 'Circular Ramp Explode'.

DIR_CIRCLE_INWARDS

Sets the Color Ramp type to 'Circular Ramp Implode'.

DIR_RADIAL

Sets the Color Ramp type to 'Radial Ramp'.